From 145ac95c683ecda55a9b2cafc84dced2e9c29e03 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 24 Oct 2022 15:52:10 +0100 Subject: gentoo auto-resync : 24:10:2022 - 15:52:09 --- .../files/amphetamine-0.8.10-SDL-conversions.patch | 22 ++++++++++++++++++++++ .../files/amphetamine-0.8.10-clang.patch | 18 ++++++++++++++++++ .../files/amphetamine-0.8.10-format-string.patch | 11 +++++++++++ 3 files changed, 51 insertions(+) create mode 100644 games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch create mode 100644 games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch create mode 100644 games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch (limited to 'games-arcade/amphetamine/files') diff --git a/games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch b/games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch new file mode 100644 index 000000000000..7182eb7acfd0 --- /dev/null +++ b/games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch @@ -0,0 +1,22 @@ +--- a/src/SndSys.cpp.orig Sun Mar 24 00:49:09 2002 ++++ b/src/SndSys.cpp Sat Jan 24 04:52:38 2009 +@@ -16,7 +16,7 @@ void Mix_Audio(void *udata, Uint8 *stream, int len) + + int InitializeSoundSystem() + { +- SDL_AudioSpec wanted, obtained; ++ SDL_AudioSpec wanted; + + /* Set the audio format */ + // Not all sounds are of the same sampling rate which is why +@@ -28,8 +28,8 @@ int InitializeSoundSystem() + wanted.callback = Mix_Audio; + wanted.userdata = NULL; + +- /* Open the audio device, forcing the desired format */ +- if ( SDL_OpenAudio(&wanted, &obtained) < 0 ) { ++ /* Open the audio device, allowing SDL to apply conversions */ ++ if ( SDL_OpenAudio(&wanted, NULL) < 0 ) { + fprintf(stderr, "InitSoundSystem: Couldn't open audio: %s\n", SDL_GetError()); + fprintf(stderr, "Sound was disabled. \n"); + return(-1); diff --git a/games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch b/games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch new file mode 100644 index 000000000000..d3fcbfdcabff --- /dev/null +++ b/games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch @@ -0,0 +1,18 @@ +Index: src/Element.cpp +--- a/src/Element.cpp.orig ++++ b/src/Element.cpp +@@ -279,7 +279,13 @@ CBackgroundElement::CBackgroundElement(short initx, sh + + void CBackgroundElement::OnAllocate() + { +- short params[5] = {-1, xs, ys, xe - xs, ye - ys}; ++ short params[5] = { ++ -1, ++ static_cast(xs), ++ static_cast(ys), ++ static_cast(xe - xs), ++ static_cast(ye - ys) ++ }; + unsigned char *tmpBmp; + + tmpBmp = gShapeManager->GetBackground(params[1], params[2]); diff --git a/games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch b/games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch new file mode 100644 index 000000000000..50e235a66a85 --- /dev/null +++ b/games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch @@ -0,0 +1,11 @@ +description: fix a format string issue +--- a/src/AmpHead.hpp ++++ b/src/AmpHead.hpp +@@ -183,6 +183,6 @@ typedef struct { + #define SWAP(a, b, _t) (a) = (_t)((long)a ^ (long)(b)); (b) = (_t)((long)(a) ^ (long)(b)); (a) = (_t)((long)(a) ^ (long)(b)); + #define NZ(a, b) ((a) == 0 ? (b) : (a)) + +-#define MSG(message) if (logFile) fprintf(logFile, message); fflush(logFile) ++#define MSG(message) if (logFile) fprintf(logFile, "%s", message); fflush(logFile) + + #endif -- cgit v1.2.3