mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 08:55:45 -04:00
FrontendCommon: Add option to inhibit screensaver
This commit is contained in:
@ -61,6 +61,7 @@ public:
|
||||
|
||||
virtual ~HostDisplay();
|
||||
|
||||
ALWAYS_INLINE const WindowInfo& GetWindowInfo() const { return m_window_info; }
|
||||
ALWAYS_INLINE s32 GetWindowWidth() const { return static_cast<s32>(m_window_info.surface_width); }
|
||||
ALWAYS_INLINE s32 GetWindowHeight() const { return static_cast<s32>(m_window_info.surface_height); }
|
||||
ALWAYS_INLINE float GetWindowScale() const { return m_window_info.surface_scale; }
|
||||
|
@ -487,6 +487,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
|
||||
si.SetFloatValue("Main", "TurboSpeed", 0.0f);
|
||||
si.SetBoolValue("Main", "SyncToHostRefreshRate", false);
|
||||
si.SetBoolValue("Main", "IncreaseTimerResolution", true);
|
||||
si.SetBoolValue("Main", "InhibitScreensaver", true);
|
||||
si.SetBoolValue("Main", "StartPaused", false);
|
||||
si.SetBoolValue("Main", "StartFullscreen", false);
|
||||
si.SetBoolValue("Main", "PauseOnFocusLoss", false);
|
||||
|
@ -147,6 +147,7 @@ void Settings::Load(SettingsInterface& si)
|
||||
turbo_speed = si.GetFloatValue("Main", "TurboSpeed", 0.0f);
|
||||
sync_to_host_refresh_rate = si.GetBoolValue("Main", "SyncToHostRefreshRate", false);
|
||||
increase_timer_resolution = si.GetBoolValue("Main", "IncreaseTimerResolution", true);
|
||||
inhibit_screensaver = si.GetBoolValue("Main", "InhibitScreensaver", true);
|
||||
start_paused = si.GetBoolValue("Main", "StartPaused", false);
|
||||
start_fullscreen = si.GetBoolValue("Main", "StartFullscreen", false);
|
||||
pause_on_focus_loss = si.GetBoolValue("Main", "PauseOnFocusLoss", false);
|
||||
@ -341,6 +342,7 @@ void Settings::Save(SettingsInterface& si) const
|
||||
si.SetFloatValue("Main", "TurboSpeed", turbo_speed);
|
||||
si.SetBoolValue("Main", "SyncToHostRefreshRate", sync_to_host_refresh_rate);
|
||||
si.SetBoolValue("Main", "IncreaseTimerResolution", increase_timer_resolution);
|
||||
si.SetBoolValue("Main", "InhibitScreensaver", inhibit_screensaver);
|
||||
si.SetBoolValue("Main", "StartPaused", start_paused);
|
||||
si.SetBoolValue("Main", "StartFullscreen", start_fullscreen);
|
||||
si.SetBoolValue("Main", "PauseOnFocusLoss", pause_on_focus_loss);
|
||||
|
@ -86,6 +86,7 @@ struct Settings
|
||||
float turbo_speed = 0.0f;
|
||||
bool sync_to_host_refresh_rate = true;
|
||||
bool increase_timer_resolution = true;
|
||||
bool inhibit_screensaver = false;
|
||||
bool start_paused = false;
|
||||
bool start_fullscreen = false;
|
||||
bool pause_on_focus_loss = false;
|
||||
|
Reference in New Issue
Block a user