summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--StarsEx/Game.cpp14
-rw-r--r--StarsEx/GameWinDX9.cpp22
-rw-r--r--StarsEx/GameWinDX9.h2
3 files changed, 25 insertions, 13 deletions
diff --git a/StarsEx/Game.cpp b/StarsEx/Game.cpp
index b7a4fb1..56cb115 100644
--- a/StarsEx/Game.cpp
+++ b/StarsEx/Game.cpp
@@ -130,9 +130,6 @@ void
Game::Activate(bool f)
{
active = f;
-
- if (active && video)
- video->InvalidateCache();
}
// +--------------------------------------------------------------------+
@@ -140,16 +137,7 @@ Game::Activate(bool f)
void
Game::Pause(bool f)
{
- if (f) {
- if (soundcard)
- soundcard->Pause();
- paused = true;
- }
- else {
- if (soundcard)
- soundcard->Resume();
- paused = false;
- }
+ paused = f;
}
// +--------------------------------------------------------------------+
diff --git a/StarsEx/GameWinDX9.cpp b/StarsEx/GameWinDX9.cpp
index 671464e..b4f7979 100644
--- a/StarsEx/GameWinDX9.cpp
+++ b/StarsEx/GameWinDX9.cpp
@@ -580,6 +580,28 @@ GameWinDX9::Run()
void
+GameWinDX9::Activate(bool f)
+{
+ Game::Activate(f);
+ if (f && video)
+ video->InvalidateCache();
+}
+
+
+void
+GameWinDX9::Pause(bool f)
+{
+ Game::Pause(f);
+ if (soundcard) {
+ if (f)
+ soundcard->Pause();
+ else
+ soundcard->Resume();
+ }
+}
+
+
+void
GameWinDX9::ShowStats()
{
if (server) return;
diff --git a/StarsEx/GameWinDX9.h b/StarsEx/GameWinDX9.h
index ef86956..88ad113 100644
--- a/StarsEx/GameWinDX9.h
+++ b/StarsEx/GameWinDX9.h
@@ -36,6 +36,8 @@ public:
virtual bool LoadPalette(PALETTEENTRY* pal, BYTE* inv);
virtual int Run() override;
+ virtual void Activate(bool f) override;
+ virtual void Pause(bool f) override;
void ShowStats();
int MaxTexSize() const;