Parcourir la source

Merge pull request #166 from blackberry-gaming/next-sgrenier

Next sgrenier
Steve Grenier il y a 14 ans
Parent
commit
5307c9f680
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      gameplay/src/PlatformWin32.cpp

+ 7 - 1
gameplay/src/PlatformWin32.cpp

@@ -253,6 +253,12 @@ static gameplay::Keyboard::Key getKey(WPARAM win32KeyCode, bool shiftDown)
 
 LRESULT CALLBACK __WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
+    if (hwnd != __hwnd)
+    {
+        // Ignore messages that are not for our game window
+        return DefWindowProc(hwnd, msg, wParam, lParam); 
+    }
+
     // 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_Y_FACTOR = 90.0f / WINDOW_HEIGHT;
@@ -401,7 +407,7 @@ LRESULT CALLBACK __WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
     case WM_KILLFOCUS:
         break;
     }
-
+    
     return DefWindowProc(hwnd, msg, wParam, lParam); 
 }