Example #1
0
static void GBACheatRefresh(struct mCheatSet* cheats, struct mCheatDevice* device) {
	struct GBACheatSet* gbaset = (struct GBACheatSet*) cheats;
	if (cheats->enabled) {
		_patchROM(device, gbaset);
	} else {
		_unpatchROM(device, gbaset);
	}
}
Example #2
0
void GBACheatDeviceDeinit(struct ARMComponent* component) {
	struct GBACheatDevice* device = (struct GBACheatDevice*) component;
	size_t i;
	for (i = GBACheatSetsSize(&device->cheats); i--;) {
		struct GBACheatSet* cheats = *GBACheatSetsGetPointer(&device->cheats, i);
		_unpatchROM(device, cheats);
		_removeBreakpoint(device, cheats);
	}
}
Example #3
0
void GBACheatRemoveSet(struct GBACheatDevice* device, struct GBACheatSet* cheats) {
	size_t i;
	for (i = 0; i < GBACheatSetsSize(&device->cheats); ++i) {
		if (*GBACheatSetsGetPointer(&device->cheats, i) == cheats) {
			break;
		}
	}
	if (i == GBACheatSetsSize(&device->cheats)) {
		return;
	}
	GBACheatSetsShift(&device->cheats, i, 1);
	_unpatchROM(device, cheats);
	_removeBreakpoint(device, cheats);
}
Example #4
0
static void GBACheatRemoveSet(struct mCheatSet* cheats, struct mCheatDevice* device) {
	struct GBACheatSet* gbaset = (struct GBACheatSet*) cheats;
	_unpatchROM(device, gbaset);
	_removeBreakpoint(device, gbaset);
}