Commit 054b7c82 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard

winex11.drv: Allow keyboard layout score to be negative.

The keyboard layout matching algorithm can assign a negative score to a keyboard layout. If the user has a strange keyboard layout, possibly a custom one, it might happen that all keyboard layouts known by Wine get a negative score. This is not an error in itself, and we should still strive to find the best match. Signed-off-by: 's avatarGiovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 25d25b23
......@@ -1432,7 +1432,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
KeySym keysym = 0;
const char (*lkey)[MAIN_LEN][4];
unsigned max_seq = 0;
int max_score = 0, ismatch = 0;
int max_score = INT_MIN, ismatch = 0;
char ckey[256][4];
syms = keysyms_per_keycode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment