Initial HID PAD work, with GLFW only.

This commit is contained in:
Kevin Hartman 2014-09-03 18:12:58 -07:00
parent bb7ddede15
commit 4a94ec934a
7 changed files with 309 additions and 26 deletions

35
src/common/key_map.h Normal file
View file

@ -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);
}