libretro / fuse-libretro

A port of the Fuse Unix Spectrum Emulator to libretro
GNU General Public License v3.0
36 stars 46 forks source link

Fix variable name collision #142

Closed vaguerant closed 2 months ago

vaguerant commented 2 months ago

The extern bool joypad_state in FUSE's src/externs.h collides with RetroArch's own use of joypad_state. On certain platforms, this causes this core to either fail to build entirely or crash when anything joypad-related occurs (usually, immediately upon game start).

I've just renamed the FUSE variable from joypad_state to joyp_state, in line with the existing keyb_state which tracks the keyboard.

Fixes #138 Fixes #124

Might also fix the following: #133

Issue #121 was likely fixed by PR #139, but since the core stopped working on Wii U, this was not obvious until now. Regardless, that issue can also be closed.

LibretroAdmin commented 2 months ago

Good catch. It's always important that global variables get named uniquely from whatever is defined in RetroArch for statically built targets.