mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
Ports: Update dosbox-staging's patches to use git patches
This commit is contained in:
parent
9188e35e1d
commit
5f986a91c6
7 changed files with 117 additions and 40 deletions
|
@ -1,6 +1,17 @@
|
||||||
diff -Naur dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp dosbox-staging-0.76.0.serenity/src/misc/fs_utils_posix.cpp
|
From 6476eefcda05b18de380eca3b772042648107b07 Mon Sep 17 00:00:00 2001
|
||||||
--- dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp 2021-06-18 15:09:39.038730252 +0200
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
+++ dosbox-staging-0.76.0.serenity/src/misc/fs_utils_posix.cpp 2021-06-18 15:08:17.603767140 +0200
|
Date: Fri, 18 Jun 2021 15:06:37 +0200
|
||||||
|
Subject: [PATCH 1/4] Skip use of glob() in serenity
|
||||||
|
|
||||||
|
We don't have that yet.
|
||||||
|
---
|
||||||
|
src/misc/fs_utils_posix.cpp | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/misc/fs_utils_posix.cpp b/src/misc/fs_utils_posix.cpp
|
||||||
|
index fa09872..96002ac 100644
|
||||||
|
--- a/src/misc/fs_utils_posix.cpp
|
||||||
|
+++ b/src/misc/fs_utils_posix.cpp
|
||||||
@@ -24,7 +24,9 @@
|
@@ -24,7 +24,9 @@
|
||||||
|
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
@ -11,10 +22,7 @@ diff -Naur dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp dosbox-staging-0.76
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
diff -Naur dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp dosbox-staging-0.76.0.serenity/src/misc/fs_utils_posix.cpp
|
@@ -75,6 +77,7 @@ std::string to_native_path(const std::string &path) noexcept
|
||||||
--- dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp 2020-12-03 19:36:19.000000000 +0100
|
|
||||||
+++ dosbox-staging-0.76.0.serenity/src/misc/fs_utils_posix.cpp 2021-06-18 14:41:19.022036547 +0200
|
|
||||||
@@ -75,6 +75,7 @@
|
|
||||||
// glob(3) sorts by default, so if more than one path will match
|
// glob(3) sorts by default, so if more than one path will match
|
||||||
// the pattern, return the first one (in alphabetic order) that matches.
|
// the pattern, return the first one (in alphabetic order) that matches.
|
||||||
const std::string pattern = translate_to_glob_pattern(path);
|
const std::string pattern = translate_to_glob_pattern(path);
|
||||||
|
@ -22,7 +30,7 @@ diff -Naur dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp dosbox-staging-0.76
|
||||||
glob_t pglob;
|
glob_t pglob;
|
||||||
const int err = glob(pattern.c_str(), GLOB_TILDE, nullptr, &pglob);
|
const int err = glob(pattern.c_str(), GLOB_TILDE, nullptr, &pglob);
|
||||||
if (err == GLOB_NOMATCH) {
|
if (err == GLOB_NOMATCH) {
|
||||||
@@ -96,6 +97,9 @@
|
@@ -96,6 +99,9 @@ std::string to_native_path(const std::string &path) noexcept
|
||||||
const std::string ret = pglob.gl_pathv[0];
|
const std::string ret = pglob.gl_pathv[0];
|
||||||
globfree(&pglob);
|
globfree(&pglob);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -32,3 +40,6 @@ diff -Naur dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp dosbox-staging-0.76
|
||||||
}
|
}
|
||||||
|
|
||||||
int create_dir(const char *path, uint32_t mode, uint32_t flags) noexcept
|
int create_dir(const char *path, uint32_t mode, uint32_t flags) noexcept
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -1,7 +1,19 @@
|
||||||
diff -Naur dosbox-staging-0.76.0/src/hardware/gus.cpp dosbox-staging-0.76.0.serenity/src/hardware/gus.cpp
|
From e62df15632c7473f88055973d2e84aec9f7dc3d8 Mon Sep 17 00:00:00 2001
|
||||||
--- dosbox-staging-0.76.0/src/hardware/gus.cpp 2020-12-03 19:36:19.000000000 +0100
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
+++ dosbox-staging-0.76.0.serenity/src/hardware/gus.cpp 2021-06-18 14:10:46.735285326 +0200
|
Date: Fri, 18 Jun 2021 15:06:37 +0200
|
||||||
@@ -245,7 +245,7 @@
|
Subject: [PATCH 2/4] Replace some size_t => Bitu
|
||||||
|
|
||||||
|
FIXME: No information as to why this is a thing exists as of yet, fill
|
||||||
|
them in when that stuff is known.
|
||||||
|
---
|
||||||
|
src/hardware/gus.cpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/hardware/gus.cpp b/src/hardware/gus.cpp
|
||||||
|
index 355a082..6c20b5c 100644
|
||||||
|
--- a/src/hardware/gus.cpp
|
||||||
|
+++ b/src/hardware/gus.cpp
|
||||||
|
@@ -245,7 +245,7 @@ private:
|
||||||
void PopulatePanScalars() noexcept;
|
void PopulatePanScalars() noexcept;
|
||||||
void PopulateVolScalars() noexcept;
|
void PopulateVolScalars() noexcept;
|
||||||
void PrepareForPlayback() noexcept;
|
void PrepareForPlayback() noexcept;
|
||||||
|
@ -10,7 +22,7 @@ diff -Naur dosbox-staging-0.76.0/src/hardware/gus.cpp dosbox-staging-0.76.0.sere
|
||||||
void RegisterIoHandlers();
|
void RegisterIoHandlers();
|
||||||
void Reset(uint8_t state);
|
void Reset(uint8_t state);
|
||||||
void SetLevelCallback(const AudioFrame &level);
|
void SetLevelCallback(const AudioFrame &level);
|
||||||
@@ -253,7 +253,7 @@
|
@@ -253,7 +253,7 @@ private:
|
||||||
void UpdateDmaAddress(uint8_t new_address);
|
void UpdateDmaAddress(uint8_t new_address);
|
||||||
void UpdateWaveMsw(int32_t &addr) const noexcept;
|
void UpdateWaveMsw(int32_t &addr) const noexcept;
|
||||||
void UpdateWaveLsw(int32_t &addr) const noexcept;
|
void UpdateWaveLsw(int32_t &addr) const noexcept;
|
||||||
|
@ -19,3 +31,6 @@ diff -Naur dosbox-staging-0.76.0/src/hardware/gus.cpp dosbox-staging-0.76.0.sere
|
||||||
void WriteToRegister();
|
void WriteToRegister();
|
||||||
|
|
||||||
// Collections
|
// Collections
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
From 73cb3bfcc987687c1ff1c1de02905b302a98a47a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
|
Date: Fri, 18 Jun 2021 15:06:37 +0200
|
||||||
|
Subject: [PATCH 3/4] Manually hardcode SDL2 library name
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.ac | 6 ++----
|
||||||
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 28e9281..1cc3691 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -45,10 +45,8 @@ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||||
|
|
||||||
|
dnl Check for SDL
|
||||||
|
SDL_VERSION=2.0.2
|
||||||
|
-AM_PATH_SDL($SDL_VERSION,
|
||||||
|
- :,
|
||||||
|
- AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
||||||
|
-)
|
||||||
|
+SDL_LIBS="-lSDL2"
|
||||||
|
+SDL_CFLAGS=""
|
||||||
|
PRESDL_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $SDL_LIBS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
From 19c66fff43c31010e3cae00c4a4a6898c0a9a30a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
|
Date: Fri, 18 Jun 2021 15:06:37 +0200
|
||||||
|
Subject: [PATCH 4/4] Disable SDL's accelerated rendering
|
||||||
|
|
||||||
|
---
|
||||||
|
src/gui/sdlmain.cpp | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp
|
||||||
|
index 7039f27..d445ebd 100644
|
||||||
|
--- a/src/gui/sdlmain.cpp
|
||||||
|
+++ b/src/gui/sdlmain.cpp
|
||||||
|
@@ -1048,7 +1048,6 @@ dosurface:
|
||||||
|
if (sdl.render_driver != "auto")
|
||||||
|
SDL_SetHint(SDL_HINT_RENDER_DRIVER, sdl.render_driver.c_str());
|
||||||
|
sdl.renderer = SDL_CreateRenderer(sdl.window, -1,
|
||||||
|
- SDL_RENDERER_ACCELERATED |
|
||||||
|
(sdl.desktop.vsync ? SDL_RENDERER_PRESENTVSYNC : 0));
|
||||||
|
if (!sdl.renderer) {
|
||||||
|
LOG_MSG("%s\n", SDL_GetError());
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
25
Ports/dosbox-staging/patches/ReadMe.md
Normal file
25
Ports/dosbox-staging/patches/ReadMe.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# Patches for dosbox-staging on SerenityOS
|
||||||
|
|
||||||
|
## `0001-Skip-use-of-glob-in-serenity.patch`
|
||||||
|
|
||||||
|
Skip use of glob() in serenity
|
||||||
|
|
||||||
|
We don't have that yet.
|
||||||
|
|
||||||
|
## `0002-Replace-some-size_t-Bitu.patch`
|
||||||
|
|
||||||
|
Replace some size_t => Bitu
|
||||||
|
|
||||||
|
FIXME: No information as to why this is a thing exists as of yet, fill
|
||||||
|
them in when that stuff is known.
|
||||||
|
|
||||||
|
## `0003-Manually-hardcode-SDL2-library-name.patch`
|
||||||
|
|
||||||
|
Manually hardcode SDL2 library name
|
||||||
|
|
||||||
|
|
||||||
|
## `0004-Disable-SDL-s-accelerated-rendering.patch`
|
||||||
|
|
||||||
|
Disable SDL's accelerated rendering
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
diff -Naur dosbox-staging-0.76.0/configure.ac dosbox-staging-0.76.0.serenity/configure.ac
|
|
||||||
--- dosbox-staging-0.76.0/configure.ac 2020-12-03 19:36:19.000000000 +0100
|
|
||||||
+++ dosbox-staging-0.76.0.serenity/configure.ac 2021-06-18 14:26:25.057372241 +0200
|
|
||||||
@@ -45,10 +45,8 @@
|
|
||||||
|
|
||||||
dnl Check for SDL
|
|
||||||
SDL_VERSION=2.0.2
|
|
||||||
-AM_PATH_SDL($SDL_VERSION,
|
|
||||||
- :,
|
|
||||||
- AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
|
||||||
-)
|
|
||||||
+SDL_LIBS="-lSDL2"
|
|
||||||
+SDL_CFLAGS=""
|
|
||||||
PRESDL_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS $SDL_LIBS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
|
|
|
@ -1,11 +0,0 @@
|
||||||
diff -Naur dosbox-staging-0.76.0/src/gui/sdlmain.cpp dosbox-staging-0.76.0.serenity/src/gui/sdlmain.cpp
|
|
||||||
--- dosbox-staging-0.76.0/src/gui/sdlmain.cpp 2020-12-03 19:36:19.000000000 +0100
|
|
||||||
+++ dosbox-staging-0.76.0.serenity/src/gui/sdlmain.cpp 2021-06-18 14:44:11.245266708 +0200
|
|
||||||
@@ -1048,7 +1048,6 @@
|
|
||||||
if (sdl.render_driver != "auto")
|
|
||||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER, sdl.render_driver.c_str());
|
|
||||||
sdl.renderer = SDL_CreateRenderer(sdl.window, -1,
|
|
||||||
- SDL_RENDERER_ACCELERATED |
|
|
||||||
(sdl.desktop.vsync ? SDL_RENDERER_PRESENTVSYNC : 0));
|
|
||||||
if (!sdl.renderer) {
|
|
||||||
LOG_MSG("%s\n", SDL_GetError());
|
|
Loading…
Add table
Add a link
Reference in a new issue