summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/GameWinDX9.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-03 20:33:07 +0200
committerAki <please@ignore.pl>2022-04-03 20:34:15 +0200
commit0703d8f36d02a4b87a8898cc847dc0d4da7bb27f (patch)
treeff04769d84ce6e042e3d0d808a6f0444e755f8c0 /StarsEx/GameWinDX9.cpp
parent029213d28484dbc4d3f874a88ce4e7b13d68b373 (diff)
downloadstarshatter-0703d8f36d02a4b87a8898cc847dc0d4da7bb27f.zip
starshatter-0703d8f36d02a4b87a8898cc847dc0d4da7bb27f.tar.gz
starshatter-0703d8f36d02a4b87a8898cc847dc0d4da7bb27f.tar.bz2
Moved video and sound related members to GameWinDX9
Diffstat (limited to 'StarsEx/GameWinDX9.cpp')
-rw-r--r--StarsEx/GameWinDX9.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/StarsEx/GameWinDX9.cpp b/StarsEx/GameWinDX9.cpp
index 3020eea..2e1aabc 100644
--- a/StarsEx/GameWinDX9.cpp
+++ b/StarsEx/GameWinDX9.cpp
@@ -21,6 +21,7 @@
#include "Utils.h"
#include "VideoFactory.h"
#include "Video.h"
+#include "VideoSettings.h"
GameWinDX9* GameWinDX9::instance = nullptr;
@@ -40,6 +41,11 @@ GameWinDX9::GameWinDX9() :
hwnd {nullptr},
hmenu {nullptr},
window_style {0},
+ video_factory {nullptr},
+ video {nullptr},
+ video_settings {nullptr},
+ soundcard {nullptr},
+ screen {nullptr},
is_windowed {false},
is_active {false},
is_device_lost {false},
@@ -52,6 +58,7 @@ GameWinDX9::GameWinDX9() :
if (instance != nullptr)
Panic::Panic("Multiple instances of GameWinDX9");
instance = this;
+ video_settings = new VideoSettings;
}
@@ -59,6 +66,11 @@ GameWinDX9::~GameWinDX9()
{
if (instance != nullptr)
instance = nullptr;
+ if (screen) delete screen;
+ if (video_factory) delete video_factory;
+ if (video) delete video;
+ if (soundcard) delete soundcard;
+ if (video_settings) delete video_settings;
}