From 7c1c3f16ff77612ed2ed4258c95354bbb099fc66 Mon Sep 17 00:00:00 2001 From: XProger Date: Thu, 6 Oct 2016 00:41:22 +0300 Subject: [PATCH] #15 Windows: Alt+Enter switches betwen window and fullscreen modes, win32 console mode only for DEBUG configuration --- bin/OpenLara.exe | Bin 82432 -> 82432 bytes src/win/OpenLara.vcxproj | 6 ++--- src/win/main.cpp | 47 +++++++++++++++++++++++++++++---------- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/bin/OpenLara.exe b/bin/OpenLara.exe index ae1da417a53eb7c101fa6c65ac8219fff3effb80..1856fa2199c609752d82b4642c1a8ae0ca8558f7 100644 GIT binary patch delta 9617 zcmd@)YgkiPwr3v_3=l|=gqJ7*gQB2P@eOFuL{UJa$RmgpTeTrou^Pk&5-^~KNC(~6 zI32%^t=iF!ZLM*HQENf5VryG!t%YhG#77T>+d)OeN;!A!a}u=Hx%1t*KQG_6&U);% z*Is+?wby=x;!E@Qw=sq&rdm799qPBWIq_6kteyn1R zU%Bg|*wB2J;yVfuPO2-o+b)D}KZk~S2}4zAPHI`X0xTW$boX>0kv?tS{1JqDpka{F zRZ^|#Xm>HVXK29(=%8E)np)=DUJAag6h-N>@hs73RE#%@f}qE5ij;6gkkJAowuBydaziltkbK0&~4TjH`g}{{`IY zHlC((@c{Sz-g^?`sk;)Xr-H}AaQwBqPhb?s=}zyBTuh2H>h4M+Ye7vo0r$H52dbRK zW1cBaz)>FlCatqL_L<@gXMyUOf*fao`k8{Q&Vq!e3ic)ebB1`mk}H-9!#SK?XAV2O zI9^JT9u2JJ%jAkgoG2cE?|R5$COFjgR&myJU?bzSvuk{(vg`KldQM>iju!_ZEzTAP z4d;82Ei49Wd-pv@nePoK;C*5>E$_xZiASPaIKa~wS~CVbFL^}K6t&T-?vYS(s)UHl zwZb!XkK74|KlB_J#>*rill5uHNIi;Dka_`}<{i%|9{dP+3zW>e_870jwCuA1D#{>W zk41_oian-;FSFmyO0~#T1^(WXWY0FB@tfMvkWd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F3O z0<;};>|+EvALty=Bl7SF4W%5bnLx>anF z(Hzivgf<3*pe~QH`hTdYr5~!P0tXlX z6Dax*K+4tubOCrB7V4=0-|SLT{|8%T4>k7lQNftYkN>@6Gauqu)J10}%O2j-|I|z3 z*h`F>>NKjU4uF8oYU*#V{^y>@LPHN5$pQOi4-BKT=VVI4&Z?>Xt!nDPKh@Ner@#=v z4S*}nz_+NWkke`^6d)Dg{wYcMSWS^BA-0I4l1jnBj_?0Gnq?33j>rZ)e89nn4JXkh z@V~XS?U*`?dik1~ItK9H2H?oA)l@n3@EQxFRHdf&RH?TH`ZnI0jKb(_8~p2u^KUim z0SQV(#lxoL{EO5f>I}%L@6#I%`-%)?qWknhU~j4cS@C^(x$`Zh)6nq$znf_s^~{R+ zryCDGj`C?s;&e36vUfVlwD`rK39=J(%F~AQXP;lXvM6!o^Ur83B{6WGHN+rgZS&iOB{{{&;h`j&+ diff --git a/src/win/OpenLara.vcxproj b/src/win/OpenLara.vcxproj index 6f9e84c1..187c746d 100644 --- a/src/win/OpenLara.vcxproj +++ b/src/win/OpenLara.vcxproj @@ -75,7 +75,7 @@ Full true true - STB_VORBIS_NO_STDIO;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + MINIMAL;STB_VORBIS_NO_STDIO;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) false false MultiThreaded @@ -86,8 +86,8 @@ true - Console - true + Windows + false true true wcrt.lib;opengl32.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) diff --git a/src/win/main.cpp b/src/win/main.cpp index 181cb29a..4126b738 100644 --- a/src/win/main.cpp +++ b/src/win/main.cpp @@ -1,13 +1,16 @@ #ifdef _DEBUG #include "crtdbg.h" #endif -/* // VS2015 ? -#include -void __cdecl operator delete(void *ptr, unsigned int size) { - // -} -*/ +#ifdef MINIMAL + #if _MSC_VER == 1900 // VS2015 + #include + void __cdecl operator delete(void *ptr, unsigned int size) { free(ptr); } + // add "/d2noftol3" to compiler additional options + // add define _NO_CRT_STDIO_INLINE + #endif +#endif + #include "game.h" DWORD getTime() { @@ -177,10 +180,29 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara PostQuitMessage(0); break; // keyboard + case WM_CHAR : + case WM_SYSCHAR : + break; case WM_KEYDOWN : case WM_KEYUP : - case WM_SYSKEYDOWN : - case WM_SYSKEYUP : + case WM_SYSKEYDOWN: + case WM_SYSKEYUP: + if (msg == WM_SYSKEYDOWN && wParam == VK_RETURN) { // switch to fullscreen or window + static WINDOWPLACEMENT pLast; + DWORD style = GetWindowLong(hWnd, GWL_STYLE); + if (style & WS_OVERLAPPEDWINDOW) { + MONITORINFO mInfo = { sizeof(mInfo) }; + if (GetWindowPlacement(hWnd, &pLast) && GetMonitorInfo(MonitorFromWindow(hWnd, MONITOR_DEFAULTTOPRIMARY), &mInfo)) { + RECT &r = mInfo.rcMonitor; + SetWindowLong(hWnd, GWL_STYLE, style & ~WS_OVERLAPPEDWINDOW); + MoveWindow(hWnd, r.left, r.top, r.right - r.left, r.bottom - r.top, FALSE); + } + } else { + SetWindowLong(hWnd, GWL_STYLE, style | WS_OVERLAPPEDWINDOW); + SetWindowPlacement(hWnd, &pLast); + } + break; + } Input::setDown(keyToInputKey(wParam), msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN); break; // mouse @@ -240,9 +262,10 @@ void freeGL(HGLRC hRC) { wglDeleteContext(hRC); } - +#ifndef _DEBUG +int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { +#else int main() { -#ifdef _DEBUG _CrtMemState _ms; _CrtMemCheckpoint(&_ms); _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); @@ -263,7 +286,7 @@ int main() { SetWindowLong(hWnd, GWL_WNDPROC, (LONG)&WndProc); ShowWindow(hWnd, SW_SHOWDEFAULT); - DWORD time, lastTime = getTime(), fpsTime = lastTime + 1000, fps = 0; + DWORD lastTime = getTime(), fpsTime = lastTime + 1000, fps = 0; MSG msg; do { @@ -273,7 +296,7 @@ int main() { } else { joyUpdate(); - time = getTime(); + DWORD time = getTime(); if (time <= lastTime) continue;