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
}
HOOK(SDL_GetWMInfo, int, (SDL_SysWMinfo *info)) {
if (!is_server) {
ensure_SDL_GetWMInfo();
return (*real_SDL_GetWMInfo)(info);
} else {
// Return Fake Lock Functions In Server Mode Since X11 Is Disabled
SDL_SysWMinfo ret;
ret.info.x11.lock_func = x11_nop;
ret.info.x11.unlock_func = x11_nop;
*info = ret;
return 1;
}
// Return Fake Lock Functions In Server Mode Since SDL X11 Is Disabled
SDL_SysWMinfo ret;
ret.info.x11.lock_func = x11_nop;
ret.info.x11.unlock_func = x11_nop;
*info = ret;
return 1;
}
#include <stdlib.h>