freebsd-ports/emulators/emu64/files/patch-src_c64__class.cpp
Rodrigo Osorio 75c6b5ff17 emulators/emu64: extend patch to fix an issue with OSS
This update is require to unbreak the port under FreeBSD.
The issue was reported to upstream and the fix will be available in future
releases.

Background: In the upstream issue, it was revealed that the whole C64 emulation
depends on the audio stream (for best sync) and initializing the audio stream
failed when the SDL backend was OSS, because it needs a fragment size that is a
power of two. The attached patch is the minimal change to 5.0.18 from the
upstream commit that solved the problem.

PR:		245395
Submitted by:	Ingo <hylaios@online.de>
Approved by:	Felix Palmen <felix@palmen-it.de> (maintainer)
MFH:		2020Q2
2020-04-19 09:05:47 +00:00

23 lines
794 B
C++

--- src/c64_class.cpp.orig 2020-04-11 10:05:13 UTC
+++ src/c64_class.cpp
@@ -27,9 +27,9 @@ int SDLThreadWarp(void *userdat);
#define C64Takt 985248 // 50,124542Hz (Original C64 PAL)
#ifdef _WIN32
- #define AudioPufferSize (882) // 882 bei 44.100 Khz
+ #define AudioPufferSize (1024) // 882 bei 44.100 Khz
#else
- #define AudioPufferSize (882) // 882 bei 44.100 Khz
+ #define AudioPufferSize (1024) // 882 bei 44.100 Khz
#endif
#define RecPollingWaitStart 20
@@ -1757,7 +1757,7 @@ void C64Class::SetFullscreenAspectRatio(bool enable)
void C64Class::AnalyzeSDLEvent(SDL_Event *event)
{
static bool joy_center_flag = true;
- static char joy_axis_tbl[5] = {1,1,0,0,-1};
+ static signed char joy_axis_tbl[5] = {1,1,0,0,-1};
SDL_Keymod keymod;