HostInterface: Modify settings loading interface to support per-frontend settings

This commit is contained in:
Connor McLaughlin
2020-05-01 01:01:50 +10:00
parent 6e7c58de43
commit d8ab587153
8 changed files with 82 additions and 38 deletions

View File

@ -291,6 +291,10 @@ bool CommonHostInterface::ParseCommandLineParameters(int argc, char* argv[],
return true;
}
void CommonHostInterface::PollAndUpdate()
{
}
bool CommonHostInterface::IsFullscreen() const
{
return false;
@ -356,6 +360,11 @@ void CommonHostInterface::OnSystemDestroyed()
StopControllerRumble();
}
void CommonHostInterface::OnRunningGameChanged()
{
HostInterface::OnRunningGameChanged();
}
void CommonHostInterface::OnControllerTypeChanged(u32 slot)
{
HostInterface::OnControllerTypeChanged(slot);
@ -403,6 +412,11 @@ void CommonHostInterface::SetDefaultSettings(SettingsInterface& si)
si.SetStringValue("Hotkeys", "ToggleSoftwareRendering", "Keyboard/End");
}
void CommonHostInterface::ApplySettings(SettingsInterface& si)
{
HostInterface::ApplySettings(si);
}
std::optional<CommonHostInterface::HostKeyCode>
CommonHostInterface::GetHostKeyCode(const std::string_view key_code) const
{

View File

@ -67,6 +67,9 @@ protected:
/// Request the frontend to exit.
virtual void RequestExit() = 0;
/// Executes per-frame tasks such as controller polling.
virtual void PollAndUpdate();
virtual bool IsFullscreen() const;
virtual bool SetFullscreen(bool enabled);
@ -76,10 +79,12 @@ protected:
virtual void OnSystemCreated() override;
virtual void OnSystemPaused(bool paused) override;
virtual void OnSystemDestroyed() override;
virtual void OnRunningGameChanged() override;
virtual void OnControllerTypeChanged(u32 slot) override;
virtual void DrawImGuiWindows() override;
virtual void SetDefaultSettings(SettingsInterface& si) override;
virtual void ApplySettings(SettingsInterface& si) override;
virtual std::optional<HostKeyCode> GetHostKeyCode(const std::string_view key_code) const;