summaryrefslogtreecommitdiff
path: root/Ports/sdl12-compat/patches
diff options
context:
space:
mode:
authorGrigoris Pavlakis <grigpavl@ece.auth.gr>2022-05-21 21:33:02 +0300
committerLinus Groh <mail@linusgroh.de>2022-05-29 18:30:39 +0100
commit3c1f899050559472542abb719c3233a4adbaa2bc (patch)
tree9c999a4b364ab9b569f7a91769b212b6e931f7e1 /Ports/sdl12-compat/patches
parent0c3db153cf252a26df30fd65209e2f37344c06ba (diff)
downloadserenity-3c1f899050559472542abb719c3233a4adbaa2bc.zip
Ports: Add SDL2 compatibility layer port (sdl12-compat)
Diffstat (limited to 'Ports/sdl12-compat/patches')
-rw-r--r--Ports/sdl12-compat/patches/0001-Disable-forced-fullscreen-on-logical-scaling.patch25
-rw-r--r--Ports/sdl12-compat/patches/ReadMe.md9
2 files changed, 34 insertions, 0 deletions
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 <grigpavl@ece.auth.gr>
+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.
+