[Scummvm-git-logs] scummvm master -> 42cfd6fbef8cd1ab6a385ef5520c601a6c239a35

lephilousophe noreply at scummvm.org
Sun Feb 23 08:24:29 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
42cfd6fbef BACKENDS: SDL: Fix build for SDL3


Commit: 42cfd6fbef8cd1ab6a385ef5520c601a6c239a35
    https://github.com/scummvm/scummvm/commit/42cfd6fbef8cd1ab6a385ef5520c601a6c239a35
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-23T09:23:47+01:00

Commit Message:
BACKENDS: SDL: Fix build for SDL3

Changed paths:
    backends/platform/sdl/sdl-window.cpp


diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index 1509fd126d4..ab8da2c4a23 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -163,11 +163,13 @@ void SdlWindow::setWindowCaption(const Common::String &caption) {
 }
 
 void SdlWindow::setResizable(bool resizable) {
-#if SDL_VERSION_ATLEAST(2, 0, 5)
 	if (_window) {
+#if SDL_VERSION_ATLEAST(3, 0, 0)
+		SDL_SetWindowResizable(_window, resizable);
+#elif SDL_VERSION_ATLEAST(2, 0, 5)
 		SDL_SetWindowResizable(_window, resizable ? SDL_TRUE : SDL_FALSE);
-	}
 #endif
+	}
 	_resizable = resizable;
 }
 
@@ -538,7 +540,9 @@ bool SdlWindow::createOrUpdateWindow(int width, int height, uint32 flags) {
 	SDL_SetWindowMouseRect(_window, shouldGrab ? &grabRect : NULL);
 #endif
 
-#if SDL_VERSION_ATLEAST(2, 0, 5)
+#if SDL_VERSION_ATLEAST(3, 0, 0)
+	SDL_SetWindowResizable(_window, _resizable);
+#elif SDL_VERSION_ATLEAST(2, 0, 5)
 	SDL_SetWindowResizable(_window, _resizable ? SDL_TRUE : SDL_FALSE);
 #endif
 




More information about the Scummvm-git-logs mailing list