Prechádzať zdrojové kódy

Fixed the windows message pump so that the error dialog appears when an assertion fails.

Darryl Gough 14 rokov pred
rodič
commit
9f38eb1236
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      gameplay/src/PlatformWin32.cpp

+ 2 - 0
gameplay/src/PlatformWin32.cpp

@@ -253,6 +253,8 @@ static gameplay::Keyboard::Key getKey(WPARAM win32KeyCode, bool shiftDown)
 
 
 LRESULT CALLBACK __WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 LRESULT CALLBACK __WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
 {
+    if (hwnd != __hwnd)
+        return DefWindowProc(hwnd, msg, wParam, lParam);
     // Scale factors for the mouse movement used to simulate the accelerometer.
     // Scale factors for the mouse movement used to simulate the accelerometer.
     static const float ACCELEROMETER_X_FACTOR = 90.0f / WINDOW_WIDTH;
     static const float ACCELEROMETER_X_FACTOR = 90.0f / WINDOW_WIDTH;
     static const float ACCELEROMETER_Y_FACTOR = 90.0f / WINDOW_HEIGHT;
     static const float ACCELEROMETER_Y_FACTOR = 90.0f / WINDOW_HEIGHT;