void exitFunc(int value) { muteSND(); if (!autoSavingEnabled && numRamBanks && !gbsMode) { printMenuMessage("Saving SRAM..."); saveGame(); } printMessage[0] = '\0'; closeMenu(); selectRom(); }
void suspendFunc(int value) { muteSND(); if (!autoSavingEnabled) { printMenuMessage("Saving SRAM..."); saveGame(); } printMenuMessage("Saving state..."); saveState(-1); printMessage[0] = '\0'; closeMenu(); selectRom(); }
int main(int argc, char* argv[]) { REG_POWERCNT = POWER_ALL & ~(POWER_MATRIX | POWER_3D_CORE); // don't need 3D consoleDebugInit(DebugDevice_CONSOLE); defaultExceptionHandler(); time(&rawTime); lastRawTime = rawTime; timerStart(0, ClockDivider_1024, TIMER_FREQ_1024(1), clockUpdater); /* Reset the EZ3in1 if present */ if (!__dsimode) { sysSetCartOwner(BUS_OWNER_ARM9); GBA_BUS[0x0000] = 0xF0; GBA_BUS[0x1000] = 0xF0; } fifoSetValue32Handler(FIFO_USER_02, fifoValue32Handler, NULL); sharedData = (SharedData*)memUncached(malloc(sizeof(SharedData))); sharedData->scalingOn = false; // It might make more sense to use "fifoSendAddress" here. // However there may have been something wrong with it in dsi mode. fifoSendValue32(FIFO_USER_03, ((u32)sharedData)&0x00ffffff); consoleOn = true; initConsole(); initInput(); readConfigFile(); if (argc >= 2) { char* filename = argv[1]; loadProgram(filename); initializeGameboyFirstTime(); } else { selectRom(); } consoleOn = false; updateScreens(); runEmul(); return 0; }
void exitNoSaveFunc(int value) { muteSND(); closeMenu(); selectRom(); }