Skip to content

Fix Libretro-MAME "offscreenreload" light gun option - #16146

Merged
dmanlfc merged 2 commits into
batocera-linux:masterfrom
TrickoUK:libretro-mame-gun-fix
Jul 26, 2026
Merged

Fix Libretro-MAME "offscreenreload" light gun option#16146
dmanlfc merged 2 commits into
batocera-linux:masterfrom
TrickoUK:libretro-mame-gun-fix

Conversation

@TrickoUK

Copy link
Copy Markdown
Contributor

Disclosure, the fix was found using Claude code.

Light guns work fine in Libretro-MAME as long as the "offscreen reload" option is turned off.
If it's turned on however the game will fail to launch with this error -

[libretro INFO] Game description: The House of the Dead (Revision A)
[INFO] [Environ] SET_ROTATION: "0" (0 deg).
[libretro ERROR] Error: unknown option: -offscreen_reload
[ERROR] [Content] Failed to load content.

As that option has been removed from standalone, and Libretro MAME now.
Instead the offscreen reload is loaded as a helper plugin now, which was already done for standalone MAME in it's generator, so fix is just to apply the same here.

I kept the more conservative fix to only apply it if its MAME system specifically given Claudes comment about the other systems also potentially picking up from this generator as I don't have any of them to test with to be sure if they need this or not.

Tested in a custom build of Batocera v44 source on x86 build with Sinden light gun, offscreen button now working fine in addition to actual shooting off screen still.

@dmanlfc

dmanlfc commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

looks ok, remove all the extra comment though please

@TrickoUK

Copy link
Copy Markdown
Contributor Author

Done.

Just for future reference, I've got some more light gun related fixes for other retroarch systems working, and I've also bumped the emulator and exposed more options into the ES advanced menu for options that were missing.

Is one PR per system OK, or are multiple focused PRs per topic, ie bump emu/gun fix/add options better?
Just looking to best fit in with how people like to review things in general.

@Tovarichtch

Copy link
Copy Markdown
Collaborator

Done.

Just for future reference, I've got some more light gun related fixes for other retroarch systems working, and I've also bumped the emulator and exposed more options into the ES advanced menu for options that were missing.

Is one PR per system OK, or are multiple focused PRs per topic, ie bump emu/gun fix/add options better? Just looking to best fit in with how people like to review things in general.

It is OK yes. But tag me for anything light gun related stuff.

@dmanlfc
dmanlfc merged commit 0894e15 into batocera-linux:master Jul 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants