Fix Client Segfault
minecraft-pi-docker/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-11-01 20:16:30 -05:00
parent a04cf1e707
commit ca911dd634
1 changed files with 6 additions and 11 deletions

View File

@ -449,17 +449,12 @@ static void x11_nop() {
// NOP // NOP
} }
HOOK(SDL_GetWMInfo, int, (SDL_SysWMinfo *info)) { HOOK(SDL_GetWMInfo, int, (SDL_SysWMinfo *info)) {
if (!is_server) { // Return Fake Lock Functions In Server Mode Since SDL X11 Is Disabled
ensure_SDL_GetWMInfo(); SDL_SysWMinfo ret;
return (*real_SDL_GetWMInfo)(info); ret.info.x11.lock_func = x11_nop;
} else { ret.info.x11.unlock_func = x11_nop;
// Return Fake Lock Functions In Server Mode Since X11 Is Disabled *info = ret;
SDL_SysWMinfo ret; return 1;
ret.info.x11.lock_func = x11_nop;
ret.info.x11.unlock_func = x11_nop;
*info = ret;
return 1;
}
} }
#include <stdlib.h> #include <stdlib.h>