NoGUI: Move default quick menu bind out of CommonHostInterface

This commit is contained in:
Connor McLaughlin 2021-08-14 23:41:02 +10:00
parent 27465c5258
commit 28d3c0768a
3 changed files with 10 additions and 4 deletions

View file

@ -81,6 +81,14 @@ void NoGUIHostInterface::Shutdown()
CommonHostInterface::Shutdown(); CommonHostInterface::Shutdown();
} }
void NoGUIHostInterface::SetDefaultSettings(SettingsInterface& si)
{
CommonHostInterface::SetDefaultSettings(si);
// TODO: Maybe we should bind this to F1 in the future.
si.SetStringValue("Hotkeys", "OpenQuickMenu", "Keyboard/Escape");
}
bool NoGUIHostInterface::CreateDisplay(bool fullscreen) bool NoGUIHostInterface::CreateDisplay(bool fullscreen)
{ {
std::optional<WindowInfo> wi = GetPlatformWindowInfo(); std::optional<WindowInfo> wi = GetPlatformWindowInfo();

View file

@ -43,6 +43,8 @@ protected:
void RequestExit() override; void RequestExit() override;
virtual void SetDefaultSettings(SettingsInterface& si) override;
virtual bool CreatePlatformWindow() = 0; virtual bool CreatePlatformWindow() = 0;
virtual void DestroyPlatformWindow() = 0; virtual void DestroyPlatformWindow() = 0;
virtual std::optional<WindowInfo> GetPlatformWindowInfo() = 0; virtual std::optional<WindowInfo> GetPlatformWindowInfo() = 0;

View file

@ -3037,10 +3037,6 @@ void CommonHostInterface::SetDefaultSettings(SettingsInterface& si)
{ {
HostInterface::SetDefaultSettings(si); HostInterface::SetDefaultSettings(si);
// TODO: Maybe we should bind this to F1 in the future.
if (m_fullscreen_ui_enabled)
si.SetStringValue("Hotkeys", "OpenQuickMenu", "Keyboard/Escape");
si.SetStringValue("Controller1", "ButtonUp", "Keyboard/W"); si.SetStringValue("Controller1", "ButtonUp", "Keyboard/W");
si.SetStringValue("Controller1", "ButtonDown", "Keyboard/S"); si.SetStringValue("Controller1", "ButtonDown", "Keyboard/S");
si.SetStringValue("Controller1", "ButtonLeft", "Keyboard/A"); si.SetStringValue("Controller1", "ButtonLeft", "Keyboard/A");