diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-04-01 04:34:45 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-04-01 04:34:45 +0000 |
| commit | 25ff222c58d5370c2c29dddcc3da78c11465b8c1 (patch) | |
| tree | 3ebad659a7d4989a578f87ba20ef234b6f163ad1 /Common/NativeApp/src | |
| parent | One more minor update to readme (diff) | |
| download | DiligentEngine-25ff222c58d5370c2c29dddcc3da78c11465b8c1.tar.gz DiligentEngine-25ff222c58d5370c2c29dddcc3da78c11465b8c1.zip | |
Updated command line format; updated submodules
Diffstat (limited to 'Common/NativeApp/src')
| -rw-r--r-- | Common/NativeApp/src/Win32/WinMain.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Common/NativeApp/src/Win32/WinMain.cpp b/Common/NativeApp/src/Win32/WinMain.cpp index f82e2c8..b19d8b4 100644 --- a/Common/NativeApp/src/Win32/WinMain.cpp +++ b/Common/NativeApp/src/Win32/WinMain.cpp @@ -59,9 +59,12 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int cmdShow) 0L, 0L, instance, NULL, NULL, NULL, NULL, WindowClassName, NULL }; RegisterClassEx(&wcex); + int DesiredWidth = 0; + int DesiredHeight = 0; + g_pTheApp->GetDesiredInitialWindowSize(DesiredWidth, DesiredHeight); // Create a window - LONG WindowWidth = 1280; - LONG WindowHeight = 1024; + LONG WindowWidth = DesiredWidth > 0 ? DesiredWidth : 1280; + LONG WindowHeight = DesiredHeight > 0 ? DesiredHeight : 1024; RECT rc = { 0, 0, WindowWidth, WindowHeight }; AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE); HWND wnd = CreateWindowA("SampleApp", AppTitle, |
