Cleanup from PR 586.
This commit is contained in:
parent
4e607da067
commit
588e82f03c
|
@ -398,21 +398,14 @@ static bool patchApplyBPS(const char* patchname, uint8_t** rom, int* size)
|
||||||
crc = crc32(0L, Z_NULL, 0);
|
crc = crc32(0L, Z_NULL, 0);
|
||||||
crc = crc32(crc, new_rom, dataSize);
|
crc = crc32(crc, new_rom, dataSize);
|
||||||
|
|
||||||
// TODO
|
if(crc == dstCRC)
|
||||||
if(crc == dstCRC) {
|
{
|
||||||
#if 1
|
|
||||||
if (dataSize > *size) {
|
if (dataSize > *size) {
|
||||||
// SIGSEGV in /src/gba/GBA.cpp:3313 [*((uint16_t*)&rom[0x1fe209c]) = 0xdffa; // SWI 0xFA]
|
|
||||||
*rom = (uint8_t*)realloc(*rom, dataSize);
|
*rom = (uint8_t*)realloc(*rom, dataSize);
|
||||||
}
|
}
|
||||||
memcpy(*rom, new_rom, dataSize);
|
memcpy(*rom, new_rom, dataSize);
|
||||||
*size = dataSize;
|
*size = dataSize;
|
||||||
free(new_rom);
|
free(new_rom);
|
||||||
#else
|
|
||||||
free(*rom);
|
|
||||||
*rom = new_rom;
|
|
||||||
*size = dataSize;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
@ -602,10 +595,6 @@ static bool patchApplyPPF(const char* patchname, uint8_t** rom, int* size)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// HINT: new format(.ext) => aditional changes in
|
|
||||||
// sdl/SDL.cpp>>>main (~1600)
|
|
||||||
// wx/panel.cpp>>>GameArea::LoadGame (~130)
|
|
||||||
|
|
||||||
bool applyPatch(const char* patchname, uint8_t** rom, int* size)
|
bool applyPatch(const char* patchname, uint8_t** rom, int* size)
|
||||||
{
|
{
|
||||||
#ifndef __LIBRETRO__
|
#ifndef __LIBRETRO__
|
||||||
|
|
Loading…
Reference in New Issue