// Custom palette static void custom_update(unsigned long key) { const char *types[] = {".pal", NULL}; char palname[128] = ""; if (!RunFileBrowser("/usr/local/home/.fceux", palname, types, "Choose nes palette (.pal)")) { CloseGame(); dingoo_deinit(); exit(-1); } std::string cpalette = std::string(palname); g_config->setOption("SDL.Palette", cpalette); }
// Main menu commands static int load_rom() { const char *types[] = { ".nes", ".fds", ".zip", ".fcm", ".fm2", ".nsf", NULL }; char filename[128], romname[128]; int error; #ifdef DINGUX_ON_WIN32 if (!RunFileBrowser("d:\\", filename, types)) { #else if (!RunFileBrowser(NULL, filename, types)) { #endif CloseGame(); SDL_Quit(); exit(-1); } // TODO - Must close game here? CloseGame(); // Is this a movie? if (!(error = FCEUD_LoadMovie(filename, romname))) error = LoadGame(filename); if (error != 1) { CloseGame(); SDL_Quit(); exit(-1); } return 1; } static int reset_nes() { FCEUI_ResetNES(); return 1; }