Android: Controller binding support

This commit is contained in:
Connor McLaughlin
2020-12-27 19:39:59 +10:00
parent 6bf37f51be
commit 0aa3b6b399
22 changed files with 1088 additions and 117 deletions

View File

@ -51,6 +51,8 @@ public:
void SetControllerType(u32 index, std::string_view type_name);
void SetControllerButtonState(u32 index, s32 button_code, bool pressed);
void SetControllerAxisState(u32 index, s32 button_code, float value);
void HandleControllerButtonEvent(u32 controller_index, u32 button_index, bool pressed);
void HandleControllerAxisEvent(u32 controller_index, u32 axis_index, float value);
void SetFastForwardEnabled(bool enabled);
void RefreshGameList(bool invalidate_cache, bool invalidate_database, ProgressCallback* progress_callback);
@ -58,6 +60,10 @@ public:
bool ImportPatchCodesFromString(const std::string& str);
jobjectArray GetInputProfileNames(JNIEnv* env) const;
bool ApplyInputProfile(const char* profile_name);
bool SaveInputProfile(const char* profile_name);
protected:
void SetUserDirectory() override;
void LoadSettings() override;
@ -66,6 +72,7 @@ protected:
bool AcquireHostDisplay() override;
void ReleaseHostDisplay() override;
std::unique_ptr<AudioStream> CreateAudioStream(AudioBackend backend) override;
void UpdateControllerInterface() override;
void OnSystemPaused(bool paused) override;
void OnSystemDestroyed() override;