summaryrefslogtreecommitdiffhomepage
path: root/Stars45/WndProc.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-23 21:45:22 +0100
committerAki <please@ignore.pl>2022-03-23 21:45:22 +0100
commit2c4aaec387ffe0eb60f92a027539195993b6408f (patch)
tree48869922ddf89e7d99a038623bf1b2e1e1e37a4c /Stars45/WndProc.cpp
parenta094eadb72d3d059b765f0d5d46c01c3a4211c87 (diff)
downloadstarshatter-2c4aaec387ffe0eb60f92a027539195993b6408f.zip
starshatter-2c4aaec387ffe0eb60f92a027539195993b6408f.tar.gz
starshatter-2c4aaec387ffe0eb60f92a027539195993b6408f.tar.bz2
Moved Video methods to GameWinDX9
Diffstat (limited to 'Stars45/WndProc.cpp')
-rw-r--r--Stars45/WndProc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Stars45/WndProc.cpp b/Stars45/WndProc.cpp
index 6d80ef3..f473752 100644
--- a/Stars45/WndProc.cpp
+++ b/Stars45/WndProc.cpp
@@ -7,6 +7,7 @@
#include "WndProc.h"
#include "Game.h"
+#include "GameWinDX9.h"
#include "Keyboard.h"
#include "Mouse.h"
#include "Types.h"
@@ -21,6 +22,7 @@ LRESULT CALLBACK
WndProc(HWND hwnd, UINT message, WPARAM uParam, LPARAM lParam)
{
auto game = Game::GetInstance();
+ auto app = GameWinDX9::GetInstance();
switch (message) {
case WM_SYSKEYDOWN:
if (uParam == VK_TAB || uParam == VK_F4)
@@ -75,19 +77,19 @@ WndProc(HWND hwnd, UINT message, WPARAM uParam, LPARAM lParam)
game->is_minimized = false;
game->is_maximized = true;
- game->ResizeVideo();
+ app->ResizeVideo();
}
else if (uParam == SIZE_RESTORED) {
if (game->is_maximized) {
game->is_maximized = false;
- game->ResizeVideo();
+ app->ResizeVideo();
}
else if (game->is_minimized) {
game->Pause(false); // Unpause since we're no longer minimized
game->is_minimized = false;
- game->ResizeVideo();
+ app->ResizeVideo();
}
else {
// If we're neither maximized nor minimized, the window size
@@ -102,7 +104,7 @@ WndProc(HWND hwnd, UINT message, WPARAM uParam, LPARAM lParam)
case WM_EXITSIZEMOVE:
if (game) {
game->Pause(false);
- game->ResizeVideo();
+ app->ResizeVideo();
}
break;