diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-02-07 03:44:49 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-02-07 03:44:49 +0000 |
| commit | b216a4818a867ca55ab1b44544f1b38acf7e6ae1 (patch) | |
| tree | 163915fc6b45df1e82f769836e88d239f3eec0fd /Common/NativeApp/src/Win32/WinMain.cpp | |
| parent | Added Winmain (diff) | |
| download | DiligentEngine-b216a4818a867ca55ab1b44544f1b38acf7e6ae1.tar.gz DiligentEngine-b216a4818a867ca55ab1b44544f1b38acf7e6ae1.zip | |
Updated Win32 app implementation
Diffstat (limited to 'Common/NativeApp/src/Win32/WinMain.cpp')
| -rw-r--r-- | Common/NativeApp/src/Win32/WinMain.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Common/NativeApp/src/Win32/WinMain.cpp b/Common/NativeApp/src/Win32/WinMain.cpp index 290f6af..2d77f9f 100644 --- a/Common/NativeApp/src/Win32/WinMain.cpp +++ b/Common/NativeApp/src/Win32/WinMain.cpp @@ -25,7 +25,6 @@ #include <iomanip> #include <Windows.h> #include "NativeAppBase.h" -#include "NativeAppData.h" #include "StringTools.h" #include "Timer.h" @@ -91,7 +90,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int cmdShow) PrevTime = CurrTime; g_pTheApp->Update(CurrTime, ElapsedTime); - g_pTheApp->PlatformRender(); + g_pTheApp->Render(); double filterScale = 0.2; filteredFrameTime = filteredFrameTime * (1.0 - filterScale) + filterScale * ElapsedTime; @@ -110,9 +109,9 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int cmdShow) // Called every time the NativeNativeAppBase receives a message LRESULT CALLBACK MessageProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) { - NativeMessage msg{ wnd, message, wParam, lParam }; - if (g_pTheApp->HandleNativeMessage(msg)) - return 0; + auto res = g_pTheApp->HandleWin32Message(wnd, message, wParam, lParam); + if (res != 0) + return res; switch (message) { |
