BigEndian: fix code that generates illegal instruction with gcc-4.9.2 on powerpc

Program received signal SIGILL, Illegal instruction.
X11_InitKeyboard (_this=0x1001f8f0)
    at /home/sdl/SDL_git/src/video/x11/SDL_x11keyboard.c:273
273	    XKeyboardState values = { .global_auto_repeat = AutoRepeatModeOff };
This commit is contained in:
Sylvain 2021-12-16 09:07:31 +01:00
parent 0b7b0977fc
commit 6101499c7c
No known key found for this signature in database
GPG Key ID: 5F87E02E5BC0939E
1 changed files with 3 additions and 1 deletions

View File

@ -267,7 +267,9 @@ X11_InitKeyboard(_THIS)
int best_index;
int distance;
Bool xkb_repeat = 0;
XKeyboardState values = { .global_auto_repeat = AutoRepeatModeOff };
XKeyboardState values;
SDL_zero(values);
values.global_auto_repeat = AutoRepeatModeOff;
X11_XGetKeyboardControl(data->display, &values);
if (values.global_auto_repeat != AutoRepeatModeOn)