small change to skel

This commit is contained in:
aap 2017-10-18 17:53:47 +02:00
parent f9668df80e
commit 2ba2258b06
1 changed files with 7 additions and 2 deletions

View File

@ -170,11 +170,14 @@ int WINAPI
WinMain(HINSTANCE instance, HINSTANCE, WinMain(HINSTANCE instance, HINSTANCE,
PSTR cmdLine, int showCmd) PSTR cmdLine, int showCmd)
{ {
/*
AllocConsole(); AllocConsole();
freopen("CONIN$", "r", stdin); freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr); freopen("CONOUT$", "w", stderr);
*/
args.argc = __argc;
args.argv = __argv;
EventHandler(INITIALIZE, nil); EventHandler(INITIALIZE, nil);
HWND win = MakeWindow(instance, HWND win = MakeWindow(instance,
@ -192,7 +195,7 @@ WinMain(HINSTANCE instance, HINSTANCE,
float lastTime = (float)GetTickCount(); float lastTime = (float)GetTickCount();
running = true; running = true;
while(pollEvents(), !globals.quit){ while((pollEvents(), running) && !globals.quit){
float currTime = (float)GetTickCount(); float currTime = (float)GetTickCount();
float timeDelta = (currTime - lastTime)*0.001f; float timeDelta = (currTime - lastTime)*0.001f;
@ -214,10 +217,12 @@ int WINAPI
WinMain(HINSTANCE instance, HINSTANCE, WinMain(HINSTANCE instance, HINSTANCE,
PSTR cmdLine, int showCmd) PSTR cmdLine, int showCmd)
{ {
/*
AllocConsole(); AllocConsole();
freopen("CONIN$", "r", stdin); freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr); freopen("CONOUT$", "w", stderr);
*/
return main(__argc, __argv); return main(__argc, __argv);
} }