Refactor input handling in Emulator and Controller for improved key event management
This commit is contained in:
@@ -19,6 +19,21 @@ namespace app {
|
||||
*/
|
||||
namespace emu {
|
||||
|
||||
struct EmulatorKeybindings {
|
||||
ImGuiKey a_button = ImGuiKey_Z;
|
||||
ImGuiKey b_button = ImGuiKey_A;
|
||||
ImGuiKey x_button = ImGuiKey_S;
|
||||
ImGuiKey y_button = ImGuiKey_X;
|
||||
ImGuiKey l_button = ImGuiKey_Q;
|
||||
ImGuiKey r_button = ImGuiKey_W;
|
||||
ImGuiKey start_button = ImGuiKey_RETURN;
|
||||
ImGuiKey select_button = ImGuiKey_BACKSPACE;
|
||||
ImGuiKey up_button = ImGuiKey_UP;
|
||||
ImGuiKey down_button = ImGuiKey_DOWN;
|
||||
ImGuiKey left_button = ImGuiKey_LEFT;
|
||||
ImGuiKey right_button = ImGuiKey_RIGHT;
|
||||
};
|
||||
|
||||
/**
|
||||
* @class Emulator
|
||||
* @brief A class for emulating and debugging SNES games.
|
||||
@@ -145,6 +160,8 @@ class Emulator : public SharedRom {
|
||||
|
||||
std::vector<uint8_t> rom_data_;
|
||||
|
||||
EmulatorKeybindings keybindings_;
|
||||
|
||||
gui::zeml::Node emulator_node_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user