summaryrefslogtreecommitdiffstats
path: root/Common/NativeApp/src/Win32/WinMain.cpp
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-04-01 04:34:45 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-04-01 04:34:45 +0000
commit25ff222c58d5370c2c29dddcc3da78c11465b8c1 (patch)
tree3ebad659a7d4989a578f87ba20ef234b6f163ad1 /Common/NativeApp/src/Win32/WinMain.cpp
parentOne more minor update to readme (diff)
downloadDiligentEngine-25ff222c58d5370c2c29dddcc3da78c11465b8c1.tar.gz
DiligentEngine-25ff222c58d5370c2c29dddcc3da78c11465b8c1.zip
Updated command line format; updated submodules
Diffstat (limited to 'Common/NativeApp/src/Win32/WinMain.cpp')
-rw-r--r--Common/NativeApp/src/Win32/WinMain.cpp7
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,