x11: Fixed incorrect function signature for XkbSetDetectableAutoRepeat.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 20 Oct 2018 21:35:48 -0400
changeset 123449dd351b26dcb
parent 12343 84eaa0636bac
child 12345 50e1cca28b39
x11: Fixed incorrect function signature for XkbSetDetectableAutoRepeat.

It needs to use Bool (which is an int) and not BOOL (which is CARD8), which
causes problems on platforms with different byte order and alignment, etc.

Fixes Bugzilla #4326.
src/video/x11/SDL_x11keyboard.c
src/video/x11/SDL_x11sym.h
     1.1 --- a/src/video/x11/SDL_x11keyboard.c	Thu Oct 18 23:38:27 2018 -0400
     1.2 +++ b/src/video/x11/SDL_x11keyboard.c	Sat Oct 20 21:35:48 2018 -0400
     1.3 @@ -266,7 +266,7 @@
     1.4      int best_distance;
     1.5      int best_index;
     1.6      int distance;
     1.7 -    BOOL xkb_repeat = 0;
     1.8 +    Bool xkb_repeat = 0;
     1.9      
    1.10      X11_XAutoRepeatOn(data->display);
    1.11  
     2.1 --- a/src/video/x11/SDL_x11sym.h	Thu Oct 18 23:38:27 2018 -0400
     2.2 +++ b/src/video/x11/SDL_x11sym.h	Sat Oct 20 21:35:48 2018 -0400
     2.3 @@ -180,7 +180,7 @@
     2.4  SDL_X11_SYM(XkbDescPtr,XkbGetMap,(Display* a,unsigned int b,unsigned int c),(a,b,c),return)
     2.5  SDL_X11_SYM(void,XkbFreeClientMap,(XkbDescPtr a,unsigned int b, Bool c),(a,b,c),)
     2.6  SDL_X11_SYM(void,XkbFreeKeyboard,(XkbDescPtr a,unsigned int b, Bool c),(a,b,c),)
     2.7 -SDL_X11_SYM(BOOL,XkbSetDetectableAutoRepeat,(Display* a, BOOL b, BOOL* c),(a,b,c),return)
     2.8 +SDL_X11_SYM(Bool,XkbSetDetectableAutoRepeat,(Display* a, Bool b, Bool* c),(a,b,c),return)
     2.9  #endif
    2.10  
    2.11  #if NeedWidePrototypes