summaryrefslogblamecommitdiffstats
path: root/src/common/key_map.cpp
blob: 309caab986e642a38cc5dcc68e4e6cfaeac7474e (plain) (tree)
1
2
3
4
5
6
7
8
9
                                        





                                          

                  





                                                           
 

                                                                    

 

                                                 


 
// 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];
}

}