From 2d6958e78d7713e3e7f1ddd7c58f036e6e19a936 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 18 Mar 2022 00:44:46 +0100 Subject: Removed DisplayModeSupported wrapper from Game --- Stars45/VidDlg.cpp | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'Stars45/VidDlg.cpp') 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()) { -- cgit v1.1