mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
fix cheat file parsing, fix superscope pause button
This commit is contained in:
parent
e033f976b2
commit
bcdc1dc56f
@ -33,21 +33,21 @@ static bool NGCLoadCheatFile (int length)
|
||||
|
||||
while (offset < length)
|
||||
{
|
||||
if(Cheat.num_cheats < MAX_CHEATS)
|
||||
{
|
||||
memcpy (data, savebuffer+offset, 28);
|
||||
offset += 28;
|
||||
if(Cheat.num_cheats >= MAX_CHEATS || (length - offset) < 28)
|
||||
break;
|
||||
|
||||
Cheat.c [Cheat.num_cheats].enabled = (data [0] & 4) == 0;
|
||||
Cheat.c [Cheat.num_cheats].byte = data [1];
|
||||
Cheat.c [Cheat.num_cheats].address = data [2] | (data [3] << 8) | (data [4] << 16);
|
||||
Cheat.c [Cheat.num_cheats].saved_byte = data [5];
|
||||
Cheat.c [Cheat.num_cheats].saved = (data [0] & 8) != 0;
|
||||
memmove (Cheat.c [Cheat.num_cheats].name, &data [8], 20);
|
||||
Cheat.c [Cheat.num_cheats++].name [20] = 0;
|
||||
}
|
||||
memcpy (data, savebuffer+offset, 28);
|
||||
offset += 28;
|
||||
|
||||
Cheat.c [Cheat.num_cheats].enabled = (data [0] & 4) == 0;
|
||||
Cheat.c [Cheat.num_cheats].byte = data [1];
|
||||
Cheat.c [Cheat.num_cheats].address = data [2] | (data [3] << 8) | (data [4] << 16);
|
||||
Cheat.c [Cheat.num_cheats].saved_byte = data [5];
|
||||
Cheat.c [Cheat.num_cheats].saved = (data [0] & 8) != 0;
|
||||
memcpy (Cheat.c [Cheat.num_cheats].name, &data[8], 20);
|
||||
Cheat.c [Cheat.num_cheats].name[20] = 0;
|
||||
Cheat.num_cheats++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,7 @@ void decodepad (int pad)
|
||||
{
|
||||
// buttons
|
||||
offset = 0x50;
|
||||
for (i = 0; i < 5; i++)
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
if (jp & btnmap[CTRL_SCOPE][CTRLR_GCPAD][i]
|
||||
#ifdef HW_RVL
|
||||
|
Loading…
Reference in New Issue
Block a user