locale: debug statements and indentation
This commit is contained in:
parent
0acd3d5a98
commit
7f67338e2d
@ -78,6 +78,7 @@ int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name)
|
||||
|
||||
if ((fp = fopen(keymap_path, "r")) == NULL)
|
||||
{
|
||||
DEBUG_KBD("%s not found", keymap_path);
|
||||
xfree(keymap_path);
|
||||
return 0;
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_var
|
||||
* "multi" the keyboard layout variant
|
||||
*/
|
||||
|
||||
while(fgets(buffer, sizeof(buffer), xprop) != NULL)
|
||||
{
|
||||
while(fgets(buffer, sizeof(buffer), xprop) != NULL)
|
||||
{
|
||||
if((pch = strstr(buffer, "_XKB_RULES_NAMES_BACKUP(STRING) = ")) != NULL)
|
||||
{
|
||||
/* "rules" */
|
||||
@ -91,9 +91,10 @@ uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_var
|
||||
|
||||
variant = beg;
|
||||
}
|
||||
}
|
||||
pclose(xprop);
|
||||
}
|
||||
pclose(xprop);
|
||||
|
||||
DEBUG_KBD("_XKB_RULES_NAMES_BACKUP layout: %s, variant: %s", layout, variant);
|
||||
keyboardLayoutId = find_keyboard_layout_in_xorg_rules(layout, variant);
|
||||
|
||||
if (keyboardLayoutId > 0)
|
||||
@ -105,10 +106,10 @@ uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_var
|
||||
|
||||
/* Check _XKB_RULES_NAMES if _XKB_RULES_NAMES_BACKUP fails */
|
||||
|
||||
xprop = popen("xprop -root _XKB_RULES_NAMES", "r");
|
||||
xprop = popen("xprop -root _XKB_RULES_NAMES", "r");
|
||||
|
||||
while(fgets(buffer, sizeof(buffer), xprop) != NULL)
|
||||
{
|
||||
while(fgets(buffer, sizeof(buffer), xprop) != NULL)
|
||||
{
|
||||
if((pch = strstr(buffer, "_XKB_RULES_NAMES(STRING) = ")) != NULL)
|
||||
{
|
||||
/* "rules" */
|
||||
@ -136,9 +137,10 @@ uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_var
|
||||
|
||||
variant = beg;
|
||||
}
|
||||
}
|
||||
pclose(xprop);
|
||||
}
|
||||
pclose(xprop);
|
||||
|
||||
DEBUG_KBD("_XKB_RULES_NAMES layout: %s, variant: %s", layout, variant);
|
||||
keyboardLayoutId = find_keyboard_layout_in_xorg_rules(layout, variant);
|
||||
|
||||
if (keyboardLayoutId > 0)
|
||||
|
@ -464,8 +464,9 @@ int freerdp_keyboard_load_map_from_xkbfile(void* display, RDP_SCANCODE x11_keyco
|
||||
{
|
||||
scancode = VIRTUAL_KEY_CODE_TO_DEFAULT_RDP_SCANCODE_TABLE[vkcode].code;
|
||||
|
||||
DEBUG_KBD("%4s: keycode: 0x%02X -> vkcode: 0x%02X -> rdp scancode: 0x%02X %s",
|
||||
xkb_keyname, i, vkcode, scancode, extended ? " extended" : "");
|
||||
DEBUG_KBD("%4s: keycode: 0x%02X -> vkcode: 0x%02X %-13s -> rdp scancode: 0x%02X %s",
|
||||
xkb_keyname, i, vkcode, freerdp_keyboard_get_virtual_key_code_name(vkcode),
|
||||
scancode, extended ? " extended" : "");
|
||||
|
||||
x11_keycode_to_rdp_scancode[i].code = scancode;
|
||||
x11_keycode_to_rdp_scancode[i].extended = extended;
|
||||
|
Loading…
Reference in New Issue
Block a user