mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
Ports: Add SDL2 compatibility layer port (sdl12-compat)
This commit is contained in:
parent
0c3db153cf
commit
3c1f899050
Notes:
sideshowbarker
2024-07-17 10:35:52 +09:00
Author: https://github.com/lightspot21 🔰 Commit: https://github.com/SerenityOS/serenity/commit/3c1f899050 Pull-request: https://github.com/SerenityOS/serenity/pull/14100 Reviewed-by: https://github.com/timschumi
@ -199,6 +199,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
|
||||
| [`sam`](sam/) | Software Automatic Mouth (SAM) | c86ea39 | https://github.com/vidarh/SAM |
|
||||
| [`scummvm`](scummvm/) | ScummVM | 2.5.1 | https://www.scummvm.org/ |
|
||||
| [`SDL_sound`](SDL_sound/) | SDL_sound (Abstract soundfile decoder) | | https://github.com/icculus/SDL_sound |
|
||||
| [`sdl12-compat`](sdl12-compat/) | SDL2 compatibility layer for SDL 1.2 games | 1.2.52 | https://github.com/libsdl-org/sdl12-compat/ |
|
||||
| [`SDL2`](SDL2/) | Simple DirectMedia Layer (SDL2) | 2.0.22 | https://github.com/libsdl-org/SDL |
|
||||
| [`SDL2-GNUBoy`](SDL2-GNUBoy/) | SDL2 GNUBoy | 1.2.1 | https://github.com/AlexOberhofer/SDL2-GNUBoy |
|
||||
| [`SDL2_gfx`](SDL2_gfx/) | SDL2\_gfx (Graphics primitives add-on for SDL2) | 1.0.4 | https://sourceforge.net/projects/sdl2gfx/ |
|
||||
|
28
Ports/sdl12-compat/package.sh
Executable file
28
Ports/sdl12-compat/package.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=sdl12-compat
|
||||
version=1.2.52
|
||||
workdir=sdl12-compat-release-${version}
|
||||
useconfigure=true
|
||||
files="https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-${version}.tar.gz ${port}-${version}.tar.gz 5bd7942703575554670a8767ae030f7921a0ac3c5e2fd173a537b7c7a8599014"
|
||||
auth_type=sha256
|
||||
|
||||
configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=${SERENITY_INSTALL_ROOT}/usr/local/" "-B./build")
|
||||
depends=("SDL2")
|
||||
|
||||
configure() {
|
||||
run cmake "${configopts[@]}"
|
||||
}
|
||||
|
||||
build() {
|
||||
(
|
||||
cd ${workdir}/build/
|
||||
make "${makeopts[@]}"
|
||||
)
|
||||
}
|
||||
|
||||
install() {
|
||||
(
|
||||
cd ${workdir}/build/
|
||||
make install
|
||||
)
|
||||
}
|
@ -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
|
||||
|
9
Ports/sdl12-compat/patches/ReadMe.md
Normal file
9
Ports/sdl12-compat/patches/ReadMe.md
Normal file
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user