citra-emu
/
citra-canary
Archived
1
0
Fork 0
This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
citra-canary/src/common/key_map.cpp

26 lines
499 B
C++

// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "key_map.h"
#include <map>
namespace KeyMap {
static std::map<HostDeviceKey, HID_User::PadState> key_map;
static int next_device_id = 0;
int NewDeviceId() {
return next_device_id++;
}
void SetKeyMapping(HostDeviceKey key, HID_User::PadState padState) {
key_map[key].hex = padState.hex;
}
HID_User::PadState GetPadKey(HostDeviceKey key) {
return key_map[key];
}
}