1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00

osal_keys: remove osal_keycode_name

This commit is contained in:
Rosalie Wanders 2021-07-28 14:06:09 +02:00 committed by Sergey Lipskiy
parent 16aff7aa9d
commit cc7eb614d1
4 changed files with 0 additions and 75 deletions

View File

@ -16,8 +16,6 @@ EXPORT void CALL osal_keys_update_state();
EXPORT unsigned int CALL osal_is_key_pressed(unsigned int _key, unsigned int _mask);
EXPORT const char * CALL osal_keycode_name(unsigned int _hidCode);
#ifdef __cplusplus
}
#endif

View File

@ -47,36 +47,6 @@ static const unsigned char LINUX_HID_TO_NATIVE[256] = {
255, 255, 255, 255, 255, 255, 255, 255, 255, 255
};
static const char* LINUX_HID_NAME[256] = {
0, 0, 0, 0, "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U",
"V", "W", "X", "Y", "Z", "1", "2", "3",
"4", "5", "6", "7", "8", "9", "0", 0,
"Escape", "Delete", "Tab", "Space", "-", "=",
"[", "]", "Backslash", 0, ";",
"'", "Grave", ",", ".", "/", "Capslock",
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9",
"F10", "F11", "F12", "Print", "Scrolllock", "Pause",
"Insert", "Home", "Page Up", "Delete", "End", "Page Down",
"Right", "Left", "Down", "Up", "Numlock", "/", "*", "-", "+",
"Enter", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ".",
"\\", "=", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20",
"F21", "F22", "F23", "F24", 0, "Help", "Menu", 0, 0, 0, 0, 0, 0,
0, 0, "Mute", "Sysrq", "Enter", "Clear", ",", "Left Control", "Left Shift",
"Left Alt", "Left Meta", "Right Control", "Right Shift", "Right Alt", "Right Meta",
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
typedef struct {
FILE* file;
char key_map[KEY_MAX/8 + 1];
@ -193,11 +163,6 @@ EXPORT unsigned int CALL osal_is_key_pressed(unsigned int _key, unsigned int _ma
return 0;
}
EXPORT const char * CALL osal_keycode_name(unsigned int _hidCode)
{
return LINUX_HID_NAME[_hidCode];
}
#ifdef __cplusplus
}
#endif

View File

@ -21,15 +21,6 @@ EXPORT unsigned int CALL osal_is_key_pressed(unsigned int _key, unsigned int _ma
return 0;
}
EXPORT unsigned int CALL osal_virtual_key_to_hid(unsigned int _key, unsigned int _hidKey)
{
return 0;
}
EXPORT const char * CALL osal_keycode_name(unsigned int _hidCode)
{
return 0;
}
#ifdef __cplusplus
}

View File

@ -24,24 +24,6 @@ static const unsigned char WIN_HID_TO_NATIVE[256] = {
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
};
static const char KEYCODE_WINDOWS_NAME_DATA[] =
"\0'\0,\0-\0.\0/\0;\0=\0A\0B\0Backspace\0C\0Caps Lock\0D\0Delete\0E\0End\0"
"Enter\0Escape\0F\0F1\0F10\0F11\0F12\0F2\0F3\0F4\0F5\0F6\0F7\0F8\0F9\0G\0H"
"\0Home\0I\0Insert\0J\0K\0L\0Left\0Left Alt\0Left Control\0Left Shift\0Lef"
"t Windows\0M\0N\0O\0P\0Page Down\0Page Up\0Pause\0Print Screen\0Q\0R\0Rig"
"ht\0Right Alt\0Right Control\0Right Shift\0Right Windows\0S\0Scroll Lock"
"\0T\0Tab\0U\0V\0W\0X\0Y\0Z\0[\0\\\0]\0`";
static const unsigned short KEYCODE_WINDOWS_NAME_OFFSET[] = {
0,0,0,0,15,17,29,41,50,69,110,112,119,128,130,132,185,187,189,191,230,232,
290,304,310,312,314,316,318,320,72,84,90,93,96,99,102,105,108,76,0,62,19,
306,0,5,13,322,326,324,0,11,1,328,3,7,9,31,71,86,89,92,95,98,101,104,107,74,
78,82,217,292,211,121,114,203,43,52,193,234,134,198,208,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,161,139,172,250,264,240,276
};
EXPORT void CALL osal_keys_init()
{
}
@ -61,17 +43,6 @@ EXPORT unsigned int CALL osal_is_key_pressed(unsigned int _key, unsigned int _ma
return GetAsyncKeyState(WIN_HID_TO_NATIVE[_key]) & _mask;
}
EXPORT const char * CALL osal_keycode_name(unsigned int _hidCode)
{
unsigned offset;
if (232 <= _hidCode)
return NULL;
offset = KEYCODE_WINDOWS_NAME_OFFSET[_hidCode];
if (offset == 0)
return NULL;
return KEYCODE_WINDOWS_NAME_DATA + offset;
}
#ifdef __cplusplus
}
#endif