Ports: Update scummvm's patches to use git patches

This commit is contained in:
Ali Mohammad Pur 2022-05-16 23:36:55 +04:30 committed by Ali Mohammad Pur
parent 0068f7f764
commit 06f9a1bacc
5 changed files with 80 additions and 30 deletions

View file

@ -1,7 +1,7 @@
From c758a59b2b26e3ab22c4fbcba6c83e0b385b86ce Mon Sep 17 00:00:00 2001
From 6c64e5bb63f9957ceddb82be5f9aafb73c14375c Mon Sep 17 00:00:00 2001
From: Jelle Raaijmakers <jelle@gmta.nl>
Date: Wed, 12 Jan 2022 13:41:39 +0100
Subject: [PATCH] Prevent call to `glGetIntegerv` without context
Subject: [PATCH 1/3] Prevent call to `glGetIntegerv` without context
This call to `SDL_GL_GetAttribute` happens when switching from the
launcher to the game, when no GL context may exist. This caused Grim
@ -26,5 +26,5 @@ index d5c034f..8a4e3ff 100644
// When rendering to a framebuffer, MSAA is enabled on that framebuffer, not on the screen
--
2.32.0
2.36.1

View file

@ -1,6 +1,17 @@
--- scummvm-2.5.1/configure 2021-12-24 22:19:28.000000000 +0000
+++ scummvm-2.5.1-patched/configure 2022-01-09 21:55:40.753734211 +0000
@@ -3998,7 +3998,7 @@
From 65f374e0cdc9bb7255ad1aadbad1869d21ac7d82 Mon Sep 17 00:00:00 2001
From: Jelle Raaijmakers <jelle@gmta.nl>
Date: Sun, 9 Jan 2022 23:01:32 +0100
Subject: [PATCH 2/3] Teach configure about serenity
---
configure | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 65e4731..39509f3 100755
--- a/configure
+++ b/configure
@@ -3998,7 +3998,7 @@ case $_host_os in
amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | morphos | n64 | ps3 | psp2 | psp | riscos | wii)
_posix=no
;;
@ -9,7 +20,7 @@
_posix=yes
;;
os2-emx*)
@@ -5538,6 +5538,9 @@
@@ -5538,6 +5538,9 @@ EOF
mingw*)
OPENGL_LIBS="-lopengl32"
;;
@ -19,3 +30,6 @@
*)
OPENGL_LIBS="-lGL"
;;
--
2.36.1

View file

@ -0,0 +1,37 @@
From ddb49b8e7be62501eeea15941b47b91902f697f8 Mon Sep 17 00:00:00 2001
From: Jelle Raaijmakers <jelle@gmta.nl>
Date: Sun, 9 Jan 2022 23:18:02 +0100
Subject: [PATCH 3/3] Remove SDL timer lock
---
backends/timer/sdl/sdl-timer.cpp | 6 ------
1 file changed, 6 deletions(-)
diff --git a/backends/timer/sdl/sdl-timer.cpp b/backends/timer/sdl/sdl-timer.cpp
index f9d79ac..ce1af0e 100644
--- a/backends/timer/sdl/sdl-timer.cpp
+++ b/backends/timer/sdl/sdl-timer.cpp
@@ -29,11 +29,7 @@
#include "common/textconsole.h"
-OSystem::MutexRef timerMutex;
-
static Uint32 timer_handler(Uint32 interval, void *param) {
- Common::StackLock lock(timerMutex);
-
((DefaultTimerManager *)param)->handler();
return interval;
}
@@ -49,8 +45,6 @@ SdlTimerManager::SdlTimerManager() {
}
SdlTimerManager::~SdlTimerManager() {
- Common::StackLock lock(timerMutex);
-
// Removes the timer callback
SDL_RemoveTimer(_timerID);
--
2.36.1

View file

@ -0,0 +1,22 @@
# Patches for scummvm on SerenityOS
## `0001-Prevent-call-to-glGetIntegerv-without-context.patch`
Prevent call to `glGetIntegerv` without context
This call to `SDL_GL_GetAttribute` happens when switching from the
launcher to the game, when no GL context may exist. This caused Grim
Fandango to crash almost immediately.
Since this is for MSAA which we do not yet support, patch it out.
## `0002-Teach-configure-about-serenity.patch`
Teach configure about serenity
## `0003-Remove-SDL-timer-lock.patch`
Remove SDL timer lock

View file

@ -1,23 +0,0 @@
--- scummvm-2.5.1/backends/timer/sdl/sdl-timer.cpp 2021-12-24 22:19:28.000000000 +0000
+++ scummvm-2.5.1-patched/backends/timer/sdl/sdl-timer.cpp 2022-01-09 22:17:13.919057360 +0000
@@ -29,11 +29,7 @@
#include "common/textconsole.h"
-OSystem::MutexRef timerMutex;
-
static Uint32 timer_handler(Uint32 interval, void *param) {
- Common::StackLock lock(timerMutex);
-
((DefaultTimerManager *)param)->handler();
return interval;
}
@@ -49,8 +45,6 @@
}
SdlTimerManager::~SdlTimerManager() {
- Common::StackLock lock(timerMutex);
-
// Removes the timer callback
SDL_RemoveTimer(_timerID);