diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index 82b18bbd0..01c2eff20 100644 --- a/src/video/SDL_sysvideo.h +++ b/src/video/SDL_sysvideo.h @@ -156,7 +156,8 @@ typedef enum { VIDEO_DEVICE_CAPS_MODE_SWITCHING_EMULATED = 0x01, VIDEO_DEVICE_CAPS_HAS_POPUP_WINDOW_SUPPORT = 0x02, - VIDEO_DEVICE_CAPS_SENDS_FULLSCREEN_DIMENSIONS = 0x04 + VIDEO_DEVICE_CAPS_SENDS_FULLSCREEN_DIMENSIONS = 0x04, + VIDEO_DEVICE_CAPS_FULLSCREEN_ONLY = 0x08 } DeviceCaps; struct SDL_VideoDevice diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 8c1503a4f..738c017b2 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -179,6 +179,11 @@ static SDL_bool SDL_SendsFullscreenDimensions(SDL_VideoDevice *_this) return !!(_this->device_caps & VIDEO_DEVICE_CAPS_SENDS_FULLSCREEN_DIMENSIONS); } +static SDL_bool IsFullscreenOnly(SDL_VideoDevice *_this) +{ + return !!(_this->device_caps & VIDEO_DEVICE_CAPS_FULLSCREEN_ONLY); +} + /* Hint to treat all window ops as synchronous */ static SDL_bool syncHint; @@ -2135,7 +2140,7 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props) window->undefined_x = undefined_x; window->undefined_y = undefined_y; - if (flags & SDL_WINDOW_FULLSCREEN) { + if (flags & SDL_WINDOW_FULLSCREEN || IsFullscreenOnly(_this)) { SDL_VideoDisplay *display = SDL_GetVideoDisplayForWindow(window); SDL_Rect bounds; @@ -2144,6 +2149,7 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props) window->y = bounds.y; window->w = bounds.w; window->h = bounds.h; + flags |= SDL_WINDOW_FULLSCREEN; } window->flags = ((flags & CREATE_FLAGS) | SDL_WINDOW_HIDDEN); diff --git a/src/video/riscos/SDL_riscosvideo.c b/src/video/riscos/SDL_riscosvideo.c index baaeb6719..bb4c1c222 100644 --- a/src/video/riscos/SDL_riscosvideo.c +++ b/src/video/riscos/SDL_riscosvideo.c @@ -87,6 +87,9 @@ static SDL_VideoDevice *RISCOS_CreateDevice(void) device->free = RISCOS_DeleteDevice; + /* TODO: Support windowed mode */ + device->device_caps = VIDEO_DEVICE_CAPS_FULLSCREEN_ONLY; + return device; } diff --git a/src/video/riscos/SDL_riscoswindow.c b/src/video/riscos/SDL_riscoswindow.c index eaacffe34..182026270 100644 --- a/src/video/riscos/SDL_riscoswindow.c +++ b/src/video/riscos/SDL_riscoswindow.c @@ -38,8 +38,6 @@ int RISCOS_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Properti } driverdata->window = window; - window->flags |= SDL_WINDOW_FULLSCREEN; - SDL_SetMouseFocus(window); /* All done! */