Просмотр исходного кода

Merge branch 'next' of https://github.com/blackberry-gaming/GamePlay into next-dgough

Darryl Gough 14 лет назад
Родитель
Сommit
d40128527e
1 измененных файлов с 7 добавлено и 1 удалено
  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); 
 }