Skip to content

Commit

Permalink
Final final commit for 1.1.1
Browse files Browse the repository at this point in the history
Fixed console input/output
  • Loading branch information
Freeeaky committed May 24, 2015
1 parent 6024d93 commit 5e882a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions build/GTALua/addons/_empty_addon/main.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
--
-- Check out "Getting started" on the Wiki!
-- http://freeschi.com/w/index.php/Main_Page
-- http://freeschi.com/w/index.php/Getting_Started
-- http://freeschi.com/w/index.php/API
-- Check out our the Wiki!
-- http://wiki.gtalua.com/index.php/Main_Page
-- http://wiki.gtalua.com/index.php/Getting_Started
-- http://wiki.gtalua.com/index.php/API
--

-- Please rename empty_addon!
-- I recommend matching thread name & folder name!
empty_addon = ScriptThread("empty_addon")

-- Run
Expand Down
6 changes: 4 additions & 2 deletions src/GTALua/UTIL/UTIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ void UTIL::Attach_Console(bool bAutomatic, int x, int y)
// Console
AllocConsole();
AttachConsole(GetCurrentProcessId());
freopen("CON", "w", stdout);
freopen("CONIN$", "r", stdin);

// Console Window
HWND hConsole = GetConsoleWindow();
Expand All @@ -40,6 +38,10 @@ void UTIL::Attach_Console(bool bAutomatic, int x, int y)
// Update Position
SetWindowPos(hConsole, NULL, x, y, rect.right - rect.left, rect.bottom - rect.top, 0);
}

// Input/Output
freopen("CON", "w", stdout);
freopen("CONIN$", "r", stdin);
}

// =================================================================================
Expand Down

0 comments on commit 5e882a8

Please sign in to comment.