From fa8ad06c603036f224ce406c38c6fd44b2cd0deb Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 7 Apr 2022 00:01:35 +0200 Subject: Removed ShowMouse from Game --- StarsEx/Game.cpp | 1 - StarsEx/Game.h | 2 -- StarsEx/StarServer.cpp | 2 -- StarsEx/WndProc.cpp | 12 +++--------- 4 files changed, 3 insertions(+), 14 deletions(-) (limited to 'StarsEx') diff --git a/StarsEx/Game.cpp b/StarsEx/Game.cpp index 8530126..63a9a30 100644 --- a/StarsEx/Game.cpp +++ b/StarsEx/Game.cpp @@ -33,7 +33,6 @@ Game::Game() : game_mode {MENU_MODE}, active {false}, paused {false}, - show_mouse {false}, frame_number {0} { if (instance != nullptr) diff --git a/StarsEx/Game.h b/StarsEx/Game.h index 9e589c2..8a9caa8 100644 --- a/StarsEx/Game.h +++ b/StarsEx/Game.h @@ -59,7 +59,6 @@ public: bool Active() { return active; } bool Paused() { return paused; } virtual bool Server() { return false; } - bool ShowMouse() { return show_mouse; } virtual void PumpEvents(); virtual void GameLoop(); @@ -76,7 +75,6 @@ protected: bool active; bool paused; - bool show_mouse; DWORD frame_number; private: diff --git a/StarsEx/StarServer.cpp b/StarsEx/StarServer.cpp index b9ba942..0cf470a 100644 --- a/StarsEx/StarServer.cpp +++ b/StarsEx/StarServer.cpp @@ -61,8 +61,6 @@ StarServer::StarServer() : throw "StarServer may have only one instance"; instance = this; - show_mouse = true; - DataLoader::Initialize(); auto loader = DataLoader::GetLoader(); if (!loader) throw "Could not get DataLoader instance"; diff --git a/StarsEx/WndProc.cpp b/StarsEx/WndProc.cpp index 2d59350..ae91a9a 100644 --- a/StarsEx/WndProc.cpp +++ b/StarsEx/WndProc.cpp @@ -40,15 +40,9 @@ WndProc(HWND hwnd, UINT message, WPARAM uParam, LPARAM lParam) return DefWindowProc(hwnd, message, uParam, lParam); case WM_SETCURSOR: - if (game && game->ShowMouse()) { - return DefWindowProc(hwnd, message, uParam, lParam); - } - else { - // hide the windows mouse cursor - SetCursor(NULL); - return 1; - } - break; + // hide the windows mouse cursor + SetCursor(NULL); + return 1; case WM_ENTERSIZEMOVE: // Halt frame movement while the app is sizing or moving -- cgit v1.1