mirror of https://github.com/mgba-emu/mgba.git
Libretro: Fix crash changing allowing opposing directions (backports libretro/mgba@2619aa)
This commit is contained in:
parent
43b6004cea
commit
417a749fec
1
CHANGES
1
CHANGES
|
@ -40,6 +40,7 @@ Other fixes:
|
|||
- Core: Fix crash when exiting game with cheats loaded
|
||||
- GBA Cheats: Fix PARv3 Thumb hooks
|
||||
- mGUI: Fix crash if last loaded ROM directory disappears (fixes mgba.io/i/1466)
|
||||
- Libretro: Fix crash changing allowing opposing directions (hhromic)
|
||||
Misc:
|
||||
- GBA Savedata: EEPROM performance fixes
|
||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||
|
|
|
@ -297,7 +297,18 @@ void retro_run(void) {
|
|||
.value = 0
|
||||
};
|
||||
if (environCallback(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
|
||||
((struct GBA*) core->board)->allowOpposingDirections = strcmp(var.value, "yes") == 0;
|
||||
struct GBA* gba = core->board;
|
||||
struct GB* gb = core->board;
|
||||
switch (core->platform(core)) {
|
||||
case PLATFORM_GBA:
|
||||
gba->allowOpposingDirections = strcmp(var.value, "yes") == 0;
|
||||
break;
|
||||
case PLATFORM_GB:
|
||||
gb->allowOpposingDirections = strcmp(var.value, "yes") == 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var.key = "mgba_frameskip";
|
||||
|
|
Loading…
Reference in New Issue