diff options
author | James Le Cuirot <chewi@gentoo.org> | 2019-11-10 21:37:12 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2019-11-10 21:39:27 +0000 |
commit | 95918849608a85cb055a0736754981ff9adf5d1a (patch) | |
tree | 350b5a04282fe59ccb72ae0d53e38933e619279e /games-emulation/hatari/files | |
parent | games-emulation/emutos: Drop old 0.9.4 and 0.9.9.1 (diff) | |
download | gentoo-95918849608a85cb055a0736754981ff9adf5d1a.tar.gz gentoo-95918849608a85cb055a0736754981ff9adf5d1a.tar.bz2 gentoo-95918849608a85cb055a0736754981ff9adf5d1a.zip |
games-emulation/hatari: Bump to 2.2.1, EAPI 7, lots of improvements
It turns out most of the dependencies are optional.
Closes: https://bugs.gentoo.org/689538
Package-Manager: Portage-2.3.79, Repoman-2.3.17
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-emulation/hatari/files')
-rw-r--r-- | games-emulation/hatari/files/hatari-2.2.1-default-rom.patch | 16 | ||||
-rw-r--r-- | games-emulation/hatari/files/hatari-2.2.1-joystick.patch | 59 |
2 files changed, 75 insertions, 0 deletions
diff --git a/games-emulation/hatari/files/hatari-2.2.1-default-rom.patch b/games-emulation/hatari/files/hatari-2.2.1-default-rom.patch new file mode 100644 index 000000000000..c42f67f733c1 --- /dev/null +++ b/games-emulation/hatari/files/hatari-2.2.1-default-rom.patch @@ -0,0 +1,16 @@ +Use etos512k.img from the emutos package rather than tos.img. + +diff -Naur a/src/configuration.c b/src/configuration.c +--- a/src/configuration.c 2019-02-08 08:30:11.000000000 +0000 ++++ b/src/configuration.c 2019-11-10 21:19:31.712605716 +0000 +@@ -841,8 +841,8 @@ + ConfigureParams.Sound.YmVolumeMixing = YM_TABLE_MIXING; + + /* Set defaults for Rom */ +- sprintf(ConfigureParams.Rom.szTosImageFileName, "%s%ctos.img", +- Paths_GetDataDir(), PATHSEP); ++ sprintf(ConfigureParams.Rom.szTosImageFileName, "%s%c..%cemutos%cetos512k.img", ++ Paths_GetDataDir(), PATHSEP, PATHSEP, PATHSEP); + ConfigureParams.Rom.bPatchTos = true; + strcpy(ConfigureParams.Rom.szCartridgeImageFileName, ""); + diff --git a/games-emulation/hatari/files/hatari-2.2.1-joystick.patch b/games-emulation/hatari/files/hatari-2.2.1-joystick.patch new file mode 100644 index 000000000000..193bb7206c31 --- /dev/null +++ b/games-emulation/hatari/files/hatari-2.2.1-joystick.patch @@ -0,0 +1,59 @@ +https://bugs.gentoo.org/689538 + +diff -ruN hatari-2.1.0.old/src/gui-sdl/sdlgui.c hatari-2.1.0/src/gui-sdl/sdlgui.c +--- hatari-2.1.0.old/src/gui-sdl/sdlgui.c 2018-02-07 18:33:56.000000000 +0000 ++++ hatari-2.1.0/src/gui-sdl/sdlgui.c 2019-07-08 23:55:50.481270799 +0100 +@@ -1329,12 +1329,28 @@ + } + break; + ++ case SDL_JOYHATMOTION: ++ if (sdlEvent.jhat.value & SDL_HAT_LEFT) ++ retbutton = SDLGui_HandleShortcut(dlg, SG_SHORTCUT_LEFT); ++ else if (sdlEvent.jhat.value & SDL_HAT_RIGHT) ++ retbutton = SDLGui_HandleShortcut(dlg, SG_SHORTCUT_RIGHT); ++ if (sdlEvent.jhat.value & SDL_HAT_UP) ++ { ++ SDLGui_RemoveFocus(dlg, focused); ++ focused = SDLGui_FocusNext(dlg, focused, -1); ++ } ++ else if (sdlEvent.jhat.value & SDL_HAT_DOWN) ++ { ++ SDLGui_RemoveFocus(dlg, focused); ++ focused = SDLGui_FocusNext(dlg, focused, +1); ++ } ++ break; ++ + case SDL_JOYBUTTONDOWN: + retbutton = SDLGui_HandleSelection(dlg, focused, focused); + break; + + case SDL_JOYBALLMOTION: +- case SDL_JOYHATMOTION: + case SDL_MOUSEMOTION: + break; + +diff -ruN hatari-2.1.0.old/src/joy.c hatari-2.1.0/src/joy.c +--- hatari-2.1.0.old/src/joy.c 2018-02-07 18:33:56.000000000 +0000 ++++ hatari-2.1.0/src/joy.c 2019-07-09 14:46:36.502410790 +0100 +@@ -199,9 +199,20 @@ + */ + static bool Joy_ReadJoystick(int nSdlJoyID, JOYREADING *pJoyReading) + { ++ unsigned hat = SDL_JoystickGetHat(sdlJoystick[nSdlJoyID], 0); ++ + /* Joystick is OK, read position from the configured joystick axis */ + pJoyReading->XPos = SDL_JoystickGetAxis(sdlJoystick[nSdlJoyID], pJoyReading->XAxisID); + pJoyReading->YPos = SDL_JoystickGetAxis(sdlJoystick[nSdlJoyID], pJoyReading->YAxisID); ++ /* Similarly to other emulators that support hats, override axis readings with hats */ ++ if (hat & SDL_HAT_LEFT) ++ pJoyReading->XPos = -32768; ++ if (hat & SDL_HAT_RIGHT) ++ pJoyReading->XPos = 32767; ++ if (hat & SDL_HAT_UP) ++ pJoyReading->YPos = -32768; ++ if (hat & SDL_HAT_DOWN) ++ pJoyReading->YPos = 32767; + /* Sets bit #0 if button #1 is pressed: */ + pJoyReading->Buttons = SDL_JoystickGetButton(sdlJoystick[nSdlJoyID], 0); + /* Sets bit #1 if button #2 is pressed: */ |