diff options
author | Aki <please@ignore.pl> | 2022-03-23 21:59:48 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-03-23 21:59:48 +0100 |
commit | 9f9f2456d5ee0091bf171fae3ad321f82e5f2ca4 (patch) | |
tree | fb5a264f26e4c3b07dc1c8e6260e7730b44fd343 /Stars45/WndProc.cpp | |
parent | 2c4aaec387ffe0eb60f92a027539195993b6408f (diff) | |
download | starshatter-9f9f2456d5ee0091bf171fae3ad321f82e5f2ca4.zip starshatter-9f9f2456d5ee0091bf171fae3ad321f82e5f2ca4.tar.gz starshatter-9f9f2456d5ee0091bf171fae3ad321f82e5f2ca4.tar.bz2 |
Moved application state internals to GameWinDX9
Diffstat (limited to 'Stars45/WndProc.cpp')
-rw-r--r-- | Stars45/WndProc.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Stars45/WndProc.cpp b/Stars45/WndProc.cpp index f473752..1f068b3 100644 --- a/Stars45/WndProc.cpp +++ b/Stars45/WndProc.cpp @@ -6,7 +6,6 @@ #include "WndProc.h" -#include "Game.h" #include "GameWinDX9.h" #include "Keyboard.h" #include "Mouse.h" @@ -21,8 +20,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM uParam, LPARAM lParam) { - auto game = Game::GetInstance(); - auto app = GameWinDX9::GetInstance(); + auto game = GameWinDX9::GetInstance(); switch (message) { case WM_SYSKEYDOWN: if (uParam == VK_TAB || uParam == VK_F4) @@ -77,19 +75,19 @@ WndProc(HWND hwnd, UINT message, WPARAM uParam, LPARAM lParam) game->is_minimized = false; game->is_maximized = true; - app->ResizeVideo(); + game->ResizeVideo(); } else if (uParam == SIZE_RESTORED) { if (game->is_maximized) { game->is_maximized = false; - app->ResizeVideo(); + game->ResizeVideo(); } else if (game->is_minimized) { game->Pause(false); // Unpause since we're no longer minimized game->is_minimized = false; - app->ResizeVideo(); + game->ResizeVideo(); } else { // If we're neither maximized nor minimized, the window size @@ -104,7 +102,7 @@ WndProc(HWND hwnd, UINT message, WPARAM uParam, LPARAM lParam) case WM_EXITSIZEMOVE: if (game) { game->Pause(false); - app->ResizeVideo(); + game->ResizeVideo(); } break; |