summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-18 00:44:46 +0100
committerAki <please@ignore.pl>2022-03-18 00:44:46 +0100
commit2d6958e78d7713e3e7f1ddd7c58f036e6e19a936 (patch)
tree4d4eabde7b3f40a931e0b114ffacbd299fbdc91d
parentdac5158376875636306610365dc1b9820a18a277 (diff)
downloadstarshatter-2d6958e78d7713e3e7f1ddd7c58f036e6e19a936.zip
starshatter-2d6958e78d7713e3e7f1ddd7c58f036e6e19a936.tar.gz
starshatter-2d6958e78d7713e3e7f1ddd7c58f036e6e19a936.tar.bz2
Removed DisplayModeSupported wrapper from Game
-rw-r--r--Stars45/Game.cpp6
-rw-r--r--Stars45/Game.h2
-rw-r--r--Stars45/VidDlg.cpp51
3 files changed, 25 insertions, 34 deletions
diff --git a/Stars45/Game.cpp b/Stars45/Game.cpp
index 24d6871..2b38db7 100644
--- a/Stars45/Game.cpp
+++ b/Stars45/Game.cpp
@@ -112,12 +112,6 @@ bool Game::IsWindowed()
// +--------------------------------------------------------------------+
-bool
-Game::DisplayModeSupported(int w, int h, int bpp)
-{
- return video && video->IsModeSupported(w, h, bpp);
-}
-
double
Game::FrameRate()
{
diff --git a/Stars45/Game.h b/Stars45/Game.h
index e181b9b..65963b1 100644
--- a/Stars45/Game.h
+++ b/Stars45/Game.h
@@ -68,8 +68,6 @@ public:
static Game* GetInstance();
- bool DisplayModeSupported(int w, int h, int bpp);
-
Clock* GetClock();
DWORD Frame();
diff --git a/Stars45/VidDlg.cpp b/Stars45/VidDlg.cpp
index 0d6fe9a..ee1473b 100644
--- a/Stars45/VidDlg.cpp
+++ b/Stars45/VidDlg.cpp
@@ -462,47 +462,46 @@ VidDlg::BuildModeList()
{
char mode_desc[32];
Starshatter* stars = Starshatter::GetInstance();
+ Video* video = Video::GetInstance();
mode->ClearItems();
selected_mode = 0;
- if (stars->DisplayModeSupported( 800, 600, 16)) mode->AddItem("800 x 600 x 16");
- if (stars->DisplayModeSupported( 800, 600, 32)) mode->AddItem("800 x 600 x 32");
+ if (video->IsModeSupported( 800, 600, 16)) mode->AddItem("800 x 600 x 16");
+ if (video->IsModeSupported( 800, 600, 32)) mode->AddItem("800 x 600 x 32");
- if (stars->DisplayModeSupported(1024, 768, 16)) mode->AddItem("1024 x 768 x 16");
- if (stars->DisplayModeSupported(1024, 768, 32)) mode->AddItem("1024 x 768 x 32");
+ if (video->IsModeSupported(1024, 768, 16)) mode->AddItem("1024 x 768 x 16");
+ if (video->IsModeSupported(1024, 768, 32)) mode->AddItem("1024 x 768 x 32");
- if (stars->DisplayModeSupported(1152, 864, 16)) mode->AddItem("1152 x 864 x 16");
- if (stars->DisplayModeSupported(1152, 864, 32)) mode->AddItem("1152 x 864 x 32");
+ if (video->IsModeSupported(1152, 864, 16)) mode->AddItem("1152 x 864 x 16");
+ if (video->IsModeSupported(1152, 864, 32)) mode->AddItem("1152 x 864 x 32");
- if (stars->DisplayModeSupported(1280, 800, 16)) mode->AddItem("1280 x 800 x 16");
- if (stars->DisplayModeSupported(1280, 800, 32)) mode->AddItem("1280 x 800 x 32");
+ if (video->IsModeSupported(1280, 800, 16)) mode->AddItem("1280 x 800 x 16");
+ if (video->IsModeSupported(1280, 800, 32)) mode->AddItem("1280 x 800 x 32");
- if (stars->DisplayModeSupported(1280, 960, 16)) mode->AddItem("1280 x 960 x 16");
- if (stars->DisplayModeSupported(1280, 960, 32)) mode->AddItem("1280 x 960 x 32");
+ if (video->IsModeSupported(1280, 960, 16)) mode->AddItem("1280 x 960 x 16");
+ if (video->IsModeSupported(1280, 960, 32)) mode->AddItem("1280 x 960 x 32");
- if (stars->DisplayModeSupported(1280,1024, 16)) mode->AddItem("1280 x 1024 x 16");
- if (stars->DisplayModeSupported(1280,1024, 32)) mode->AddItem("1280 x 1024 x 32");
+ if (video->IsModeSupported(1280,1024, 16)) mode->AddItem("1280 x 1024 x 16");
+ if (video->IsModeSupported(1280,1024, 32)) mode->AddItem("1280 x 1024 x 32");
- if (stars->DisplayModeSupported(1366, 768, 16)) mode->AddItem("1366 x 768 x 16");
- if (stars->DisplayModeSupported(1366, 768, 32)) mode->AddItem("1366 x 768 x 32");
+ if (video->IsModeSupported(1366, 768, 16)) mode->AddItem("1366 x 768 x 16");
+ if (video->IsModeSupported(1366, 768, 32)) mode->AddItem("1366 x 768 x 32");
- if (stars->DisplayModeSupported(1440, 900, 16)) mode->AddItem("1440 x 900 x 16");
- if (stars->DisplayModeSupported(1440, 900, 32)) mode->AddItem("1440 x 900 x 32");
+ if (video->IsModeSupported(1440, 900, 16)) mode->AddItem("1440 x 900 x 16");
+ if (video->IsModeSupported(1440, 900, 32)) mode->AddItem("1440 x 900 x 32");
- if (stars->DisplayModeSupported(1600, 900, 16)) mode->AddItem("1600 x 900 x 16");
- if (stars->DisplayModeSupported(1600, 900, 32)) mode->AddItem("1600 x 900 x 32");
+ if (video->IsModeSupported(1600, 900, 16)) mode->AddItem("1600 x 900 x 16");
+ if (video->IsModeSupported(1600, 900, 32)) mode->AddItem("1600 x 900 x 32");
- if (stars->DisplayModeSupported(1600,1200, 16)) mode->AddItem("1600 x 1200 x 16");
- if (stars->DisplayModeSupported(1600,1200, 32)) mode->AddItem("1600 x 1200 x 32");
+ if (video->IsModeSupported(1600,1200, 16)) mode->AddItem("1600 x 1200 x 16");
+ if (video->IsModeSupported(1600,1200, 32)) mode->AddItem("1600 x 1200 x 32");
- if (stars->DisplayModeSupported(1680,1050, 16)) mode->AddItem("1680 x 1050 x 16");
- if (stars->DisplayModeSupported(1680,1050, 32)) mode->AddItem("1680 x 1050 x 32");
+ if (video->IsModeSupported(1680,1050, 16)) mode->AddItem("1680 x 1050 x 16");
+ if (video->IsModeSupported(1680,1050, 32)) mode->AddItem("1680 x 1050 x 32");
- if (stars->DisplayModeSupported(1920,1080, 16)) mode->AddItem("1920 x 1080 x 16");
- if (stars->DisplayModeSupported(1920,1080, 32)) mode->AddItem("1920 x 1080 x 32");
-
- Video* video = stars->GetVideo();
+ if (video->IsModeSupported(1920,1080, 16)) mode->AddItem("1920 x 1080 x 16");
+ if (video->IsModeSupported(1920,1080, 32)) mode->AddItem("1920 x 1080 x 32");
if (stars && video) {
switch (video->Width()) {