summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/VidDlg.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-03-02 01:15:13 +0100
committerAki <please@ignore.pl>2024-03-02 01:18:45 +0100
commite70158ea57302e2fa2d588b67fc8dc18265192eb (patch)
treeec1d90159f147a9aa896cb654cda905c2f3ee357 /StarsEx/VidDlg.cpp
parent8b21a7027491d7e69bb165c0c50b0a23d1c8755e (diff)
downloadstarshatter-e70158ea57302e2fa2d588b67fc8dc18265192eb.zip
starshatter-e70158ea57302e2fa2d588b67fc8dc18265192eb.tar.gz
starshatter-e70158ea57302e2fa2d588b67fc8dc18265192eb.tar.bz2
You can now toggle Full Screen in Video settings
Full screen setting is preserved after game is restarted. Switching in and out of full screen repetitively causes some mode inconsistencies, but this should be enough for now. You can still force window mode with -win CLI option.
Diffstat (limited to 'StarsEx/VidDlg.cpp')
-rw-r--r--StarsEx/VidDlg.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/StarsEx/VidDlg.cpp b/StarsEx/VidDlg.cpp
index 7447349..36253ae 100644
--- a/StarsEx/VidDlg.cpp
+++ b/StarsEx/VidDlg.cpp
@@ -92,6 +92,7 @@ VidDlg::RegisterControls()
REGISTER_CLIENT(EID_CLICK, gamma, VidDlg, OnGamma);
}
+ full_screen = (ComboBox*) FindControl(202);
lens_flare = (ComboBox*) FindControl(211);
corona = (ComboBox*) FindControl(212);
nebula = (ComboBox*) FindControl(213);
@@ -131,7 +132,7 @@ VidDlg::Show()
FormWindow::Show();
if (closed) {
- bool fullscreen = true;
+ bool is_fullscreen = false;
if (stars) {
selected_render = 9;
@@ -158,7 +159,10 @@ VidDlg::Show()
if (bump_maps)
bump_maps->SetSelection(video->IsBumpMapEnabled());
- fullscreen = video->IsFullScreen();
+ if (full_screen) {
+ is_fullscreen = video->IsFullScreen();
+ full_screen->SetSelection(is_fullscreen);
+ }
}
if (lens_flare)
@@ -180,7 +184,7 @@ VidDlg::Show()
if (mode) {
BuildModeList();
mode->SetSelection(selected_mode);
- mode->SetEnabled(fullscreen);
+ mode->SetEnabled(is_fullscreen);
}
if (tex_size)
@@ -362,6 +366,7 @@ VidDlg::Apply()
Video* video = Video::GetInstance();
if (video) {
const VideoSettings* vs = video->GetVideoSettings();
+ video_change = static_cast<bool>(full_screen->GetSelectedIndex()) != video->IsFullScreen();
if (vs)
bias = vs->depth_bias;
@@ -404,9 +409,10 @@ VidDlg::Apply()
if (f) {
fprintf(f, "VIDEO\n\n");
- fprintf(f, "width: %4d\n", w);
- fprintf(f, "height: %4d\n", h);
- fprintf(f, "depth: %4d\n", d);
+ fprintf(f, "full_screen: %s\n", full_screen->GetSelectedIndex() ? "true" : "false");
+ fprintf(f, "width: %4d\n", w);
+ fprintf(f, "height: %4d\n", h);
+ fprintf(f, "depth: %4d\n", d);
fprintf(f, "\n");
fprintf(f, "max_tex: %d\n", (int) pow(2.0f, 6 + selected_tex_size));
fprintf(f, "primary3D: %s\n", (a>0)?"true":"false");