From 2ba2258b063b660d85ae16858f1158434b912d5c Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 18 Oct 2017 17:53:47 +0200 Subject: [PATCH] small change to skel --- skeleton/win.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/skeleton/win.cpp b/skeleton/win.cpp index d93c53b..91120a6 100644 --- a/skeleton/win.cpp +++ b/skeleton/win.cpp @@ -170,11 +170,14 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, PSTR cmdLine, int showCmd) { +/* AllocConsole(); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr); - +*/ + args.argc = __argc; + args.argv = __argv; EventHandler(INITIALIZE, nil); HWND win = MakeWindow(instance, @@ -192,7 +195,7 @@ WinMain(HINSTANCE instance, HINSTANCE, float lastTime = (float)GetTickCount(); running = true; - while(pollEvents(), !globals.quit){ + while((pollEvents(), running) && !globals.quit){ float currTime = (float)GetTickCount(); float timeDelta = (currTime - lastTime)*0.001f; @@ -214,10 +217,12 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, PSTR cmdLine, int showCmd) { +/* AllocConsole(); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr); +*/ return main(__argc, __argv); }