citra-mk7/src/common/key_map.cpp

26 lines
532 B
C++
Raw Normal View History

// Copyright 2014 Citra Emulator Project
2014-12-17 06:38:14 +01:00
// Licensed under GPLv2 or any later version
2014-09-04 03:12:58 +02:00
// 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++;
}
2014-09-04 03:12:58 +02:00
void SetKeyMapping(HostDeviceKey key, Service::HID::PadState padState) {
key_map[key].hex = padState.hex;
2014-09-04 03:12:58 +02:00
}
Service::HID::PadState GetPadKey(HostDeviceKey key) {
return key_map[key];
2014-09-04 03:12:58 +02:00
}
}