mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 06:55:45 -04:00
CommonHostInterface: Make RunLater()/ApplySettings() virtual
This commit is contained in:
@ -325,15 +325,20 @@ void SDLHostInterface::SaveAndUpdateSettings()
|
||||
{
|
||||
m_settings_copy.Save(*m_settings_interface.get());
|
||||
|
||||
Settings old_settings(std::move(g_settings));
|
||||
CommonHostInterface::LoadSettings(*m_settings_interface.get());
|
||||
CommonHostInterface::ApplyGameSettings(false);
|
||||
CommonHostInterface::FixIncompatibleSettings(false);
|
||||
CheckForSettingsChanges(old_settings);
|
||||
ApplySettings(false);
|
||||
|
||||
m_settings_interface->Save();
|
||||
}
|
||||
|
||||
void SDLHostInterface::ApplySettings(bool display_osd_messages)
|
||||
{
|
||||
Settings old_settings(std::move(g_settings));
|
||||
CommonHostInterface::LoadSettings(*m_settings_interface.get());
|
||||
CommonHostInterface::ApplyGameSettings(display_osd_messages);
|
||||
CommonHostInterface::FixIncompatibleSettings(display_osd_messages);
|
||||
CheckForSettingsChanges(old_settings);
|
||||
}
|
||||
|
||||
bool SDLHostInterface::IsFullscreen() const
|
||||
{
|
||||
return m_fullscreen;
|
||||
|
@ -40,6 +40,12 @@ public:
|
||||
|
||||
bool RequestRenderWindowSize(s32 new_window_width, s32 new_window_height) override;
|
||||
|
||||
bool IsFullscreen() const override;
|
||||
bool SetFullscreen(bool enabled) override;
|
||||
|
||||
void RunLater(std::function<void()> callback) override;
|
||||
void ApplySettings(bool display_osd_messages) override;
|
||||
|
||||
void Run();
|
||||
|
||||
protected:
|
||||
@ -67,14 +73,8 @@ private:
|
||||
void CreateImGuiContext();
|
||||
void UpdateFramebufferScale();
|
||||
|
||||
/// Executes a callback later, after the UI has finished rendering. Needed to boot while rendering ImGui.
|
||||
void RunLater(std::function<void()> callback);
|
||||
|
||||
void SaveAndUpdateSettings();
|
||||
|
||||
bool IsFullscreen() const override;
|
||||
bool SetFullscreen(bool enabled) override;
|
||||
|
||||
// We only pass mouse input through if it's grabbed
|
||||
void DrawImGuiWindows() override;
|
||||
void DoStartDisc();
|
||||
|
Reference in New Issue
Block a user