Revert "Added function to check for newer emulators/hardware."
This reverts commit c267dd6ee6e9766c70a1522adf6f0a812e337ae6. # TODOs changed: # -: Needs to be updated if compiling for a different processor than the GBA's: # TODOs changed: # -: Needs to be updated if compiling for a different processor than the GBA's: # TODOs changed: # -: Needs to be updated if compiling for a different processor than the GBA's:
This commit is contained in:
parent
915f40c654
commit
c990851473
@ -537,7 +537,7 @@ struct SaveBlock2
|
||||
|
||||
extern struct SaveBlock2 *gSaveBlock2Ptr;
|
||||
|
||||
extern bool8 IsAccurateGBA(void);
|
||||
extern u8 UpdateSpritePaletteWithTime(u8);
|
||||
|
||||
struct SecretBaseParty
|
||||
{
|
||||
|
||||
10
src/main.c
10
src/main.c
@ -441,13 +441,3 @@ void ClearPokemonCrySongs(void)
|
||||
{
|
||||
CpuFill16(0, gPokemonCrySongs, MAX_POKEMON_CRIES * sizeof(struct PokemonCrySong));
|
||||
}
|
||||
|
||||
// TODO: Needs to be updated if compiling for a different processor than the GBA's
|
||||
bool8 IsAccurateGBA(void) { // tests to see whether running on either an accurate emulator in >=2020, or real hardware
|
||||
u32 code[5] = {0xFF1EE12F, 0xE1DF00B0, 0xE12FFF1E, 0xAAAABBBB, 0xCCCCDDDD}; // ARM: _;ldrh r0, [pc];bx lr
|
||||
u32 func = (u32) &code[0];
|
||||
if (func & 3) // not word aligned; safer to just return false here
|
||||
return FALSE;
|
||||
func = (func & ~3) | 0x2; // misalign PC to test PC-relative loading
|
||||
return ((u32 (*)(void)) func)() == code[3] >> 16;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user