Qt: Properly implement "Start Fullscreen"

This commit is contained in:
Connor McLaughlin
2020-03-12 13:53:58 +10:00
parent 2480624cbe
commit 8f39a0f154
12 changed files with 56 additions and 33 deletions

View File

@ -113,7 +113,7 @@ bool HostInterface::BootSystem(const SystemBootParameters& parameters)
void HostInterface::PauseSystem(bool paused)
{
if (paused == m_paused)
if (paused == m_paused || !m_system)
return;
m_paused = paused;

View File

@ -13,6 +13,7 @@ void Settings::Load(SettingsInterface& si)
speed_limiter_enabled = si.GetBoolValue("Main", "SpeedLimiterEnabled", true);
increase_timer_resolution = si.GetBoolValue("Main", "IncreaseTimerResolution", true);
start_paused = si.GetBoolValue("Main", "StartPaused", false);
start_fullscreen = si.GetBoolValue("Main", "StartFullscreen", false);
save_state_on_exit = si.GetBoolValue("Main", "SaveStateOnExit", true);
confim_power_off = si.GetBoolValue("Main", "ConfirmPowerOff", true);
@ -32,7 +33,6 @@ void Settings::Load(SettingsInterface& si)
.value_or(DisplayCropMode::None);
display_force_progressive_scan = si.GetBoolValue("Display", "ForceProgressiveScan", true);
display_linear_filtering = si.GetBoolValue("Display", "LinearFiltering", true);
display_fullscreen = si.GetBoolValue("Display", "Fullscreen", false);
video_sync_enabled = si.GetBoolValue("Display", "VSync", true);
cdrom_read_thread = si.GetBoolValue("CDROM", "ReadThread", true);
@ -71,6 +71,7 @@ void Settings::Save(SettingsInterface& si) const
si.SetBoolValue("Main", "SpeedLimiterEnabled", speed_limiter_enabled);
si.SetBoolValue("Main", "IncreaseTimerResolution", increase_timer_resolution);
si.SetBoolValue("Main", "StartPaused", start_paused);
si.SetBoolValue("Main", "StartFullscreen", start_fullscreen);
si.SetBoolValue("Main", "SaveStateOnExit", save_state_on_exit);
si.SetBoolValue("Main", "ConfirmPowerOff", confim_power_off);
@ -85,7 +86,6 @@ void Settings::Save(SettingsInterface& si) const
si.SetBoolValue("Display", "ForceProgressiveScan", display_force_progressive_scan);
si.SetBoolValue("Display", "LinearFiltering", display_linear_filtering);
si.SetBoolValue("Display", "Fullscreen", display_fullscreen);
si.SetBoolValue("Display", "VSync", video_sync_enabled);
si.SetBoolValue("CDROM", "ReadThread", cdrom_read_thread);

View File

@ -41,6 +41,7 @@ struct Settings
bool speed_limiter_enabled = true;
bool increase_timer_resolution = true;
bool start_paused = false;
bool start_fullscreen = false;
bool save_state_on_exit = true;
bool confim_power_off = true;
@ -53,7 +54,6 @@ struct Settings
DisplayCropMode display_crop_mode = DisplayCropMode::None;
bool display_force_progressive_scan = false;
bool display_linear_filtering = true;
bool display_fullscreen = false;
bool video_sync_enabled = true;
bool cdrom_read_thread = true;