Fix Client Segfault
This commit is contained in:
parent
a04cf1e707
commit
ca911dd634
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user