From 3c1f899050559472542abb719c3233a4adbaa2bc Mon Sep 17 00:00:00 2001 From: Grigoris Pavlakis Date: Sat, 21 May 2022 21:33:02 +0300 Subject: Ports: Add SDL2 compatibility layer port (sdl12-compat) --- ...able-forced-fullscreen-on-logical-scaling.patch | 25 ++++++++++++++++++++++ Ports/sdl12-compat/patches/ReadMe.md | 9 ++++++++ 2 files changed, 34 insertions(+) create mode 100644 Ports/sdl12-compat/patches/0001-Disable-forced-fullscreen-on-logical-scaling.patch create mode 100644 Ports/sdl12-compat/patches/ReadMe.md (limited to 'Ports/sdl12-compat/patches') diff --git a/Ports/sdl12-compat/patches/0001-Disable-forced-fullscreen-on-logical-scaling.patch b/Ports/sdl12-compat/patches/0001-Disable-forced-fullscreen-on-logical-scaling.patch new file mode 100644 index 0000000000..df9e6f1d3c --- /dev/null +++ b/Ports/sdl12-compat/patches/0001-Disable-forced-fullscreen-on-logical-scaling.patch @@ -0,0 +1,25 @@ +From a2b0791418672dffcfc8baae4d0b8158693a794c Mon Sep 17 00:00:00 2001 +From: Grigoris Pavlakis +Date: Sat, 28 May 2022 17:21:27 +0300 +Subject: [PATCH] Disable forced fullscreen on logical scaling + +--- + src/SDL12_compat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c +index b3a411e..4d8001d 100644 +--- a/src/SDL12_compat.c ++++ b/src/SDL12_compat.c +@@ -5184,7 +5184,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags12) + fullscreen_flags20 &= ~SDL_WINDOW_FULLSCREEN_DESKTOP; + SDL20_SetWindowFullscreen(VideoWindow20, fullscreen_flags20); + SDL20_SetWindowSize(VideoWindow20, width, height); +- fullscreen_flags20 |= SDL_WINDOW_FULLSCREEN; ++ /* fullscreen_flags20 |= SDL_WINDOW_FULLSCREEN; */ + SDL20_SetWindowFullscreen(VideoWindow20, fullscreen_flags20); + } + } +-- +2.36.1 + diff --git a/Ports/sdl12-compat/patches/ReadMe.md b/Ports/sdl12-compat/patches/ReadMe.md new file mode 100644 index 0000000000..a59098e897 --- /dev/null +++ b/Ports/sdl12-compat/patches/ReadMe.md @@ -0,0 +1,9 @@ +# Patches for sdl12-compat on SerenityOS + +## `0001-Disable-forced-fullscreen-on-logical-scaling.patch` + +sdl12-compat forces fullscreen on anything that sets video mode +and uses OpenGL logical scaling, causing rapid flickering and preventing +execution. Not sure if this is an upstream bug or intended behavior, +but disabling fullscreen at this point fixes the flickering. + -- cgit v1.2.3