mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
ControllerInterface/Xlib: Combine keycodes with the same name to fix non-working inputs.
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#include <X11/Xlib.h>
|
||||
@@ -39,15 +41,20 @@ private:
|
||||
friend class KeyboardMouse;
|
||||
|
||||
public:
|
||||
Key(std::string name, KeyCode keycode, const char* keyboard);
|
||||
|
||||
std::string GetName() const override { return m_keyname; }
|
||||
Key(Display* display, KeyCode keycode, const char* keyboard);
|
||||
ControlState GetState() const override;
|
||||
|
||||
static const char* GetNameForKeyCode(Display* display, KeyCode keycode);
|
||||
|
||||
private:
|
||||
std::string m_keyname;
|
||||
Display* const m_display;
|
||||
void AddKeyCode(KeyCode);
|
||||
bool IsKeyCodePressed(KeyCode) const;
|
||||
|
||||
const std::string m_keyname;
|
||||
const char* const m_keyboard;
|
||||
const KeyCode m_keycode;
|
||||
std::vector<KeyCode> m_keycodes;
|
||||
};
|
||||
|
||||
class Button : public Input
|
||||
|
||||
Reference in New Issue
Block a user