From 0d99425f5fe1256f6f300eafae85adaf8fda6b94 Mon Sep 17 00:00:00 2001 From: LHoG <1476261+lhog@users.noreply.github.com> Date: Mon, 3 Jan 2022 14:49:09 +0300 Subject: [PATCH] Fix headless --- rts/lib/headlessStubs/sdlstub.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rts/lib/headlessStubs/sdlstub.c b/rts/lib/headlessStubs/sdlstub.c index 583f016b34..08214e0f69 100644 --- a/rts/lib/headlessStubs/sdlstub.c +++ b/rts/lib/headlessStubs/sdlstub.c @@ -279,6 +279,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_GetAppState() { extern DECLSPEC int SDL_GetNumVideoDisplays(void) { return 0; } + extern DECLSPEC int SDL_GetDisplayBounds(int displayIndex, SDL_Rect* rect) { if (rect == 0) return -1; rect->w = 640; @@ -288,6 +289,19 @@ extern DECLSPEC int SDL_GetDisplayBounds(int displayIndex, SDL_Rect* rect) { return 0; } +extern DECLSPEC int SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect* rect) { + if (rect == 0) return -1; + rect->w = 640; + rect->h = 480; + rect->x = 0; + rect->y = 0; + return 0; +} + +extern DECLSPEC const char* SDLCALL SDL_GetDisplayName(int displayIndex) { + return ""; +} + extern DECLSPEC int SDL_GL_GetSwapInterval() { return 0; }