libfreerdp-locale: fix non-XKB compilation
This commit is contained in:
parent
2152db9eb4
commit
39acaa2792
@ -49,7 +49,7 @@ RDP_SCANCODE X11_KEYCODE_TO_RDP_SCANCODE[256];
|
||||
extern const VIRTUAL_KEY_CODE VIRTUAL_KEY_CODE_TABLE[256];
|
||||
extern const RDP_SCANCODE VIRTUAL_KEY_CODE_TO_RDP_SCANCODE_TABLE[256];
|
||||
|
||||
static int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name)
|
||||
int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name)
|
||||
{
|
||||
FILE* fp;
|
||||
char* pch;
|
||||
|
@ -908,13 +908,13 @@ uint32 freerdp_keyboard_init_x11(uint32 keyboardLayoutId)
|
||||
if (keyboardLayoutId == 0)
|
||||
{
|
||||
keyboardLayoutId = freerdp_detect_keyboard_layout_from_system_locale();
|
||||
DEBUG_KBD("using keyboard layout: %X", keyboardLayoutID);
|
||||
DEBUG_KBD("using keyboard layout: %X", keyboardLayoutId);
|
||||
}
|
||||
|
||||
if (keyboardLayoutId == 0)
|
||||
{
|
||||
keyboardLayoutId = 0x0409;
|
||||
DEBUG_KBD("using default keyboard layout: %X", keyboardLayoutID);
|
||||
DEBUG_KBD("using default keyboard layout: %X", keyboardLayoutId);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -20,8 +20,12 @@
|
||||
#ifndef __LIBLOCALE_H
|
||||
#define __LIBLOCALE_H
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/utils/debug.h>
|
||||
|
||||
int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name);
|
||||
void freerdp_keyboard_load_maps(uint32 keycode_to_vkcode[256], char* names);
|
||||
|
||||
#ifdef WITH_DEBUG_KBD
|
||||
#define DEBUG_KBD(fmt, ...) DEBUG_CLASS(KBD, fmt, ## __VA_ARGS__)
|
||||
#else
|
||||
|
@ -727,7 +727,7 @@ uint32 freerdp_detect_keyboard_layout_from_system_locale()
|
||||
if (locale == NULL)
|
||||
return 0;
|
||||
|
||||
DEBUG_KBD("Found locale : %s_%s", locale.language, locale.country);
|
||||
DEBUG_KBD("Found locale : %s_%s", locale->language, locale->country);
|
||||
|
||||
for (i = 0; i < sizeof(LOCALE_KEYBOARD_LAYOUTS_TABLE) / sizeof(LOCALE_KEYBOARD_LAYOUTS); i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user