mirror of
https://github.com/RGBCube/serenity
synced 2025-07-31 14:27:34 +00:00
Ports: Remove SRB2 mouse hacks
This patch builds off the previous commit and removes the mouse hacks entirely as they are not needed anymore. With this, Sonic Robo Blast 2 now correctly locks the mouse inside the game and makes for a much better playing experience! :^)
This commit is contained in:
parent
33b772a7fa
commit
f77e91e0f0
3 changed files with 2 additions and 66 deletions
88
Ports/SRB2/patches/0004-i_system.c-hacks.patch
Normal file
88
Ports/SRB2/patches/0004-i_system.c-hacks.patch
Normal file
|
@ -0,0 +1,88 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Refrag <R3FR4GYT@gmail.com>
|
||||
Date: Sun, 4 Feb 2024 17:45:18 +0100
|
||||
Subject: [PATCH] i_system.c hacks
|
||||
|
||||
This patch disables / removes some code to get the game to build without issues.
|
||||
These don't seem to matter much anyway as the game still runs.
|
||||
---
|
||||
src/sdl/i_system.c | 19 +++++++------------
|
||||
1 file changed, 7 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c
|
||||
index 902194f4f..e2306aa9c 100644
|
||||
--- a/src/sdl/i_system.c
|
||||
+++ b/src/sdl/i_system.c
|
||||
@@ -83,14 +83,11 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
||||
#include <sys/vfs.h>
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
-#include <sys/mount.h>
|
||||
/*For meminfo*/
|
||||
#include <sys/types.h>
|
||||
#ifdef FREEBSD
|
||||
#include <kvm.h>
|
||||
#endif
|
||||
-#include <nlist.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -138,7 +135,6 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
||||
#endif
|
||||
|
||||
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
-#include <execinfo.h>
|
||||
#include <time.h>
|
||||
#define UNIXBACKTRACE
|
||||
#endif
|
||||
@@ -267,6 +263,7 @@ UINT8 keyboard_started = false;
|
||||
|
||||
static void write_backtrace(INT32 signal)
|
||||
{
|
||||
+#if 0
|
||||
int fd = -1;
|
||||
size_t size;
|
||||
time_t rawtime;
|
||||
@@ -316,6 +313,7 @@ static void write_backtrace(INT32 signal)
|
||||
CRASHLOG_WRITE("\n"); // Write another newline to the log so it looks nice :)
|
||||
|
||||
close(fd);
|
||||
+#endif
|
||||
}
|
||||
#undef STDERR_WRITE
|
||||
#undef CRASHLOG_WRITE
|
||||
@@ -2066,6 +2064,8 @@ void I_StartupMouse2(void)
|
||||
else
|
||||
rts = 1;
|
||||
}
|
||||
+
|
||||
+ #if 0
|
||||
if (dtr != -1 || rts != -1)
|
||||
{
|
||||
INT32 c;
|
||||
@@ -2082,6 +2082,7 @@ void I_StartupMouse2(void)
|
||||
c |= TIOCM_RTS;
|
||||
ioctl(fdmouse2, TIOCMSET, &c);
|
||||
}
|
||||
+ #endif
|
||||
}
|
||||
mouse2_started = 1;
|
||||
I_AddExitFunc(I_ShutdownMouse2);
|
||||
@@ -2671,14 +2672,8 @@ void I_GetDiskFreeSpace(INT64 *freespace)
|
||||
#if defined (SOLARIS) || defined (__HAIKU__)
|
||||
*freespace = INT32_MAX;
|
||||
return;
|
||||
-#else // Both Linux and BSD have this, apparently.
|
||||
- struct statfs stfs;
|
||||
- if (statfs(srb2home, &stfs) == -1)
|
||||
- {
|
||||
- *freespace = INT32_MAX;
|
||||
- return;
|
||||
- }
|
||||
- *freespace = stfs.f_bavail * stfs.f_bsize;
|
||||
+#else
|
||||
+ *freespace = 1024*1024*1024;
|
||||
#endif
|
||||
#elif defined (_WIN32)
|
||||
static p_GetDiskFreeSpaceExA pfnGetDiskFreeSpaceEx = NULL;
|
Loading…
Add table
Add a link
Reference in a new issue