From 4540a190c1429eae7a179112d8c410c407e4761e Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 30 Jan 2021 15:45:52 +1000 Subject: [PATCH] CommonHostInterface: Make input profile functions public --- src/frontend-common/common_host_interface.h | 44 ++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/frontend-common/common_host_interface.h b/src/frontend-common/common_host_interface.h index efd81cdce..c65d60b52 100644 --- a/src/frontend-common/common_host_interface.h +++ b/src/frontend-common/common_host_interface.h @@ -49,6 +49,13 @@ public: using HotkeyInfoList = std::vector; + struct InputProfileEntry + { + std::string name; + std::string path; + }; + using InputProfileList = std::vector; + struct SaveStateInfo { std::string path; @@ -100,6 +107,21 @@ public: /// Parses command line parameters for all frontends. bool ParseCommandLineParameters(int argc, char* argv[], std::unique_ptr* out_boot_params); + /// Returns a path where an input profile with the specified name would be saved. + std::string GetSavePathForInputProfile(const char* name) const; + + /// Returns a list of all input profiles. first - name, second - path + InputProfileList GetInputProfileList() const; + + /// Returns the path for an input profile. + std::string GetInputProfilePath(const char* name) const; + + /// Applies the specified input profile. + void ApplyInputProfile(const char* profile_path, SettingsInterface& si); + + /// Saves the current input configuration to the specified profile name. + bool SaveInputProfile(const char* profile_path, SettingsInterface& si); + /// Loads the current emulation state from file. Specifying a slot of -1 loads the "resume" game state. bool LoadState(bool global, s32 slot); @@ -213,13 +235,6 @@ protected: float duration; }; - struct InputProfileEntry - { - std::string name; - std::string path; - }; - using InputProfileList = std::vector; - CommonHostInterface(); ~CommonHostInterface(); @@ -257,21 +272,6 @@ protected: /// Reloads the input map from config. Callable from controller interface. virtual void UpdateInputMap() = 0; - /// Returns a path where an input profile with the specified name would be saved. - std::string GetSavePathForInputProfile(const char* name) const; - - /// Returns a list of all input profiles. first - name, second - path - InputProfileList GetInputProfileList() const; - - /// Returns the path for an input profile. - std::string GetInputProfilePath(const char* name) const; - - /// Applies the specified input profile. - void ApplyInputProfile(const char* profile_path, SettingsInterface& si); - - /// Saves the current input configuration to the specified profile name. - bool SaveInputProfile(const char* profile_path, SettingsInterface& si); - void RegisterHotkey(String category, String name, String display_name, InputButtonHandler handler); bool HandleHostKeyEvent(HostKeyCode code, bool pressed); bool HandleHostMouseEvent(HostMouseButton button, bool pressed);