aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/key_map.h
diff options
context:
space:
mode:
authorGravatar Kevin Hartman <kevin@hart.mn>2014-09-03 18:12:58 -0700
committerGravatar Kevin Hartman <kevin@hart.mn>2014-09-11 22:43:42 -0700
commit4a94ec934ab1a2216f94e3fcc46f5dde1d6e2f02 (patch)
tree2588f0c6051c9a5e3f23057d2953c35a854dbc43 /src/common/key_map.h
parentbb7ddede159d820b6f8b49caf0758940903ece3b (diff)
Initial HID PAD work, with GLFW only.
Diffstat (limited to 'src/common/key_map.h')
-rw-r--r--src/common/key_map.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/common/key_map.h b/src/common/key_map.h
new file mode 100644
index 00000000..7e94df61
--- /dev/null
+++ b/src/common/key_map.h
@@ -0,0 +1,35 @@
+// Copyright 2013 Dolphin Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/hle/service/hid.h"
+
+namespace KeyMap {
+
+class CitraKey {
+public:
+ CitraKey() : keyCode(0) {}
+ CitraKey(int code) : keyCode(code) {}
+
+ int keyCode;
+
+ bool operator < (const CitraKey &other) const {
+ return keyCode < other.keyCode;
+ }
+
+ bool operator == (const CitraKey &other) const {
+ return keyCode == other.keyCode;
+ }
+};
+
+struct DefaultKeyMapping {
+ KeyMap::CitraKey key;
+ HID_User::PADState state;
+};
+
+void SetKeyMapping(CitraKey key, HID_User::PADState padState);
+HID_User::PADState Get3DSKey(CitraKey key);
+
+}