blob: 844d5df68bde10dd01dfc6abd0177697c2a7437d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "key_map.h"
#include <map>
namespace KeyMap {
static std::map<HostDeviceKey, Service::HID::PadState> key_map;
static int next_device_id = 0;
int NewDeviceId() {
return next_device_id++;
}
void SetKeyMapping(HostDeviceKey key, Service::HID::PadState padState) {
key_map[key].hex = padState.hex;
}
Service::HID::PadState GetPadKey(HostDeviceKey key) {
return key_map[key];
}
}
|