diff --git a/src/common/ConfigManager.cpp b/src/common/ConfigManager.cpp index 2e14c54d..7eaa6327 100644 --- a/src/common/ConfigManager.cpp +++ b/src/common/ConfigManager.cpp @@ -241,7 +241,7 @@ int* rewindSerials = NULL; u32 autoFrameSkipLastTime; u32 movieLastJoypad; u32 movieNextJoypad; -unsigned short throttle; +int throttle; const char* preparedCheatCodes[MAX_CHEATS]; diff --git a/src/common/ConfigManager.h b/src/common/ConfigManager.h index 9338ef66..9853134d 100644 --- a/src/common/ConfigManager.h +++ b/src/common/ConfigManager.h @@ -136,7 +136,7 @@ extern int winPauseNextFrame; extern u32 autoFrameSkipLastTime; extern u32 movieLastJoypad; extern u32 movieNextJoypad; -extern unsigned short throttle; +extern int throttle; #define MAX_CHEATS 100 extern int preparedCheats; diff --git a/src/wx/cmdevents.cpp b/src/wx/cmdevents.cpp index ceccb904..4d833901 100644 --- a/src/wx/cmdevents.cpp +++ b/src/wx/cmdevents.cpp @@ -107,7 +107,7 @@ EVT_HANDLER(RecentReset, "Reset recent ROM list") if(gopts.recent->GetCount()) { while(gopts.recent->GetCount()) gopts.recent->RemoveFileFromHistory(0); - wxConfig *cfg = wxGetApp().cfg; + wxFileConfig *cfg = wxGetApp().cfg; cfg->SetPath(wxT("/Recent")); gopts.recent->Save(*cfg); cfg->SetPath(wxT("/")); @@ -863,13 +863,13 @@ EVT_HANDLER_MASK(ScreenCapture, "Screen capture...", CMDEN_GB|CMDEN_GBA) } } wxString def_name = panel->game_name(); - if(gopts.cap_format == 0) + if(captureFormat == 0) def_name.append(wxT(".png")); else def_name.append(wxT(".bmp")); wxFileDialog dlg(this, _("Select output file"), scap_path, def_name, _("PNG images|*.png|BMP images|*.bmp"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT); - dlg.SetFilterIndex(gopts.cap_format); + dlg.SetFilterIndex(captureFormat); int ret = ShowModal(&dlg); scap_path = dlg.GetDirectory(); if(ret != wxID_OK) @@ -1119,7 +1119,7 @@ EVT_HANDLER(Pause, "Pause (toggle)") else if(!IsPaused()) panel->Resume(); // undo next-frame's zeroing of frameskip - int fs = panel->game_type() == IMAGE_GB ? gopts.gb_frameskip : gopts.gba_frameskip; + int fs = panel->game_type() == IMAGE_GB ? gbFrameSkip : frameSkip; if(fs > 0) systemFrameSkip = fs; } @@ -1751,7 +1751,7 @@ EVT_HANDLER(GeneralConfigure, "General options...") if(ShowModal(dlg) == wxID_OK) update_opts(); if(panel->game_type() != IMAGE_UNKNOWN) - soundSetThrottle(gopts.throttle); + soundSetThrottle(throttle); if(rew != gopts.rewind_interval) { if(!gopts.rewind_interval) { if(panel->num_rewind_states) { @@ -1796,7 +1796,7 @@ EVT_HANDLER(GameBoyConfigure, "Game Boy options...") } // this value might have been overwritten by FrameSkip if(XRCCTRL(*dlg, "FrameSkipAuto", wxCheckBox)->GetValue()) - gopts.gb_frameskip = -1; + gbFrameSkip = -1; update_opts(); if(panel->game_type() == IMAGE_GB) { if(borderon != gbBorderOn) { @@ -1807,8 +1807,8 @@ EVT_HANDLER(GameBoyConfigure, "Game Boy options...") panel->DelBorder(); } // autoskip will self-adjust - if(gopts.gb_frameskip >= 0) - systemFrameSkip = gopts.gb_frameskip; + if(gbFrameSkip >= 0) + systemFrameSkip = gbFrameSkip; // don't want to have to reset to change colors memcpy(gbPalette, &systemGbPalette[gbPaletteOption * 8], 8 * sizeof(systemGbPalette[0])); } @@ -1862,13 +1862,13 @@ EVT_HANDLER(GameBoyAdvanceConfigure, "Game Boy Advance options...") return; // this value might have been overwritten by FrameSkip if(XRCCTRL(*dlg, "FrameSkipAuto", wxCheckBox)->GetValue()) - gopts.gba_frameskip = -1; + frameSkip = -1; update_opts(); if(panel->game_type() == IMAGE_GBA) { // autoskip will self-adjust - if(gopts.gba_frameskip >= 0) - systemFrameSkip = gopts.gba_frameskip; - agbPrintEnable(gopts.agbprint); + if(frameSkip >= 0) + systemFrameSkip = frameSkip; + agbPrintEnable(agbPrint); #if 0 // disabled in win32 version for undocumented "problems" if(gopts.skip_intro) *((u32 *)rom) = 0xea00002e; @@ -1971,7 +1971,7 @@ EVT_HANDLER(GameBoyAdvanceConfigure, "Game Boy Advance options...") EVT_HANDLER_MASK(DisplayConfigure, "Display options...", CMDEN_NREC_ANY) { - bool fs = gopts.fullscreen; + bool fs = fullScreen; wxVideoMode dm = gopts.fs_mode; if(gopts.max_threads != 1) @@ -1987,9 +1987,9 @@ EVT_HANDLER_MASK(DisplayConfigure, "Display options...", CMDEN_NREC_ANY) return; update_opts(); - if(fs != gopts.fullscreen) + if(fs != fullScreen) { - panel->ShowFullScreen(gopts.fullscreen); + panel->ShowFullScreen(fullScreen); } else if(panel->IsFullScreen() && dm != gopts.fs_mode) { diff --git a/src/wx/dsound.cpp b/src/wx/dsound.cpp index 911cab37..9bee9c7a 100644 --- a/src/wx/dsound.cpp +++ b/src/wx/dsound.cpp @@ -239,7 +239,7 @@ void DirectSound::write(u16 * finalWave, int length) LPVOID lpvPtr2; DWORD dwBytes2 = 0; - if (!speedup && synchronize && !gopts.throttle && !gba_joybus_active) { + if (!speedup && synchronize && !throttle && !gba_joybus_active) { hr = dsbSecondary->GetStatus(&status); if( status & DSBSTATUS_PLAYING ) { if( !soundPaused ) { diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp index 9b035c21..d1ae3a6b 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -1373,7 +1373,7 @@ public: void JoypadConfigButtons(wxCommandEvent &ev) { bool clear = ev.GetId() == XRCID("Clear"); for(int i = 0; i < NUM_KEYS; i++) { - wxJoyKeyTextCtrl *tc = XRCCTRL_D(*p, joynames[i], wxJoyKeyTextCtrl); + wxJoyKeyTextCtrl *tc = XRCCTRL_D(*p, wxString::FromUTF8(joynames[i]), wxJoyKeyTextCtrl); if(clear) tc->SetValue(wxEmptyString); else { @@ -1957,7 +1957,7 @@ public: void Init(wxShowEvent &ev) { ev.Skip(); - DoSetThrottleSel(gopts.throttle); + DoSetThrottleSel(throttle); } } throttle_ctrl; @@ -1987,8 +1987,8 @@ wxDialog * MainFrame::LoadXRCDialog(const char * name) #if (wxMAJOR_VERSION < 3) if(!dialog->GetParent()) dialog->Reparent(this); - mark_recursive(dialog); #endif + mark_recursive(dialog); return dialog; } @@ -2006,8 +2006,8 @@ wxPropertySheetDialog * MainFrame::LoadXRCropertySheetDialog(const char * name) #if (wxMAJOR_VERSION < 3) if(!dialog->GetParent()) dialog->Reparent(this); - mark_recursive(dialog); #endif + mark_recursive(dialog); return dialog; } @@ -2627,18 +2627,23 @@ bool MainFrame::InitMore(void) cb=SafeXRCCTRL(d, n); \ cb->SetValidator(wxGenericValidator(&o)); \ } while(0) +#define getcbi(n, o) do { \ + cb=SafeXRCCTRL(d, n); \ + cb->SetValidator(wxBoolIntValidator(&o, 1)); \ +} while(0) + wxSpinCtrl *sc; #define getsc(n, o) do { \ sc=SafeXRCCTRL(d, n); \ sc->SetValidator(wxGenericValidator(&o)); \ } while(0) { - getcbb("PauseWhenInactive", gopts.defocus_pause); - getcbb("ApplyPatches", gopts.apply_patches); - getrbi("PNG", gopts.cap_format, 0); - getrbi("BMP", gopts.cap_format, 1); + getcbi("PauseWhenInactive", pauseWhenInactive); + getcbi("ApplyPatches", autoPatch); + getrbi("PNG", captureFormat, 0); + getrbi("BMP", captureFormat, 1); getsc("RewindInterval", gopts.rewind_interval); - getsc("Throttle", gopts.throttle); + getsc("Throttle", throttle); throttle_ctrl.thr = sc; throttle_ctrl.thrsel=SafeXRCCTRL(d, "ThrottleSel"); throttle_ctrl.thr-> @@ -2696,24 +2701,24 @@ bool MainFrame::InitMore(void) /// Speed // AutoSkip/FrameSkip are 2 controls for 1 value. Needs post-process // to ensure checkbox not ignored - getcbie("FrameSkipAuto", gopts.gb_frameskip, -1); - getsc("FrameSkip", gopts.gb_frameskip); + getcbie("FrameSkipAuto", gbFrameSkip, -1); + getsc("FrameSkip", gbFrameSkip); addbier(sc, true); getlab("FrameSkipLab"); addbier(lab, true); /// Boot ROM - getcbbe("BootRomEn", gopts.gb_use_bios); + getcbie("BootRomEn", useBiosFileGB, 1); getfp("BootRom", gopts.gb_bios); addbe(fp); getlab("BootRomLab"); addbe(lab); - getcbbe("CBootRomEn", gopts.gbc_use_bios); + getcbie("CBootRomEn", useBiosFileGBC, 1); getfp("CBootRom", gopts.gbc_bios); addbe(fp); getlab("CBootRomLab"); addbe(lab); /// Custom Colors - getcbb("Color", gbColorOption); + getcbi("Color", gbColorOption); wxFarRadio *r = NULL; for(int i = 0; i < 3; i++) { wxString pn; @@ -2758,9 +2763,9 @@ bool MainFrame::InitMore(void) d=LoadXRCropertySheetDialog("GameBoyAdvanceConfig"); { /// System and peripherals - ch=GetValidatedChild(d, "SaveType",wxGenericValidator(& gopts.save_type)); + ch=GetValidatedChild(d, "SaveType",wxGenericValidator(& cpuSaveType)); BatConfigHandler.type = ch; - ch=GetValidatedChild(d, "FlashSize",wxGenericValidator(& gopts.flash_size)); + ch=GetValidatedChild(d, "FlashSize",wxGenericValidator(& winFlashSize)); BatConfigHandler.size = ch; d->Connect(XRCID("SaveType"), wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BatConfig_t::ChangeType), @@ -2774,28 +2779,24 @@ bool MainFrame::InitMore(void) d->Connect(XRCID("Detect"), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BatConfig_t::Detect), NULL, &BatConfigHandler); - getcbb("RTC", gopts.rtc); - getcbb("AGBPrinter", gopts.agbprint); + getcbi("RTC", rtcEnabled); + getcbi("AGBPrinter", agbPrint); /// Speed // AutoSkip/FrameSkip are 2 controls for 1 value. Needs post-process // to ensure checkbox not ignored - getcbie("FrameSkipAuto", gopts.gba_frameskip, -1); - getsc("FrameSkip", gopts.gba_frameskip); + getcbie("FrameSkipAuto", autoFrameSkip, -1); + getsc("FrameSkip", frameSkip); addbier(sc, true); getlab("FrameSkipLab"); addbier(lab, true); /// Boot ROM - getcbbe("BootRomEn", gopts.gba_use_bios); + getcbie("BootRomEn", useBiosFileGBA, 1); getfp("BootRom", gopts.gba_bios); addbe(fp); getlab("BootRomLab"); addbe(lab); - getcbb("SkipIntro", gopts.skip_intro); - addbe(cb); - // doesn't work right now - cb->Hide(); /// Game Overrides getgbaw("GameSettings"); @@ -2812,19 +2813,19 @@ bool MainFrame::InitMore(void) { /// On-Screen Display ch=GetValidatedChild(d, "SpeedIndicator",wxGenericValidator(& gopts.osd_speed)); - getcbb("NoStatusMsg", gopts.no_osd_status); - getcbb("Transparent", gopts.osd_transparent); + getcbi("NoStatusMsg", disableStatusMessages); + getcbi("Transparent", showSpeedTransparent); /// Zoom // this was a choice, but I'd rather not have to make an off-by-one // validator just for this, and spinctrl is good enough. getsc("DefaultScale", gopts.video_scale); getcbb("RetainAspect", gopts.retain_aspect); - getsc("MaxScale", gopts.max_scale); + getsc("MaxScale", maxScale); // fs modes should be filled in at popup time // since they may change based on what screen is current SafeXRCCTRL(d, "FullscreenMode"); - getcbb("Fullscreen", gopts.fullscreen); + getcbi("Fullscreen", fullScreen); /// Advanced getrbi("OutputSimple", gopts.render_method, RND_SIMPLE); @@ -2841,7 +2842,7 @@ bool MainFrame::InitMore(void) rb->Hide(); #endif getcbb("Bilinear", gopts.bilinear); - getcbb("VSync", gopts.vsync); + getcbi("VSync", vsync); // FIXME: make cb disabled when not GL or d3d int mthr = wxThread::GetCPUCount(); if(mthr > 8) @@ -2871,7 +2872,7 @@ bool MainFrame::InitMore(void) d->Fit(); } - d=LoadXRCropertySheetDialog("SoundConfig"); + d = LoadXRCropertySheetDialog("SoundConfig"); wxSlider *sl; #define getsl(n, o) do { \ sl=SafeXRCCTRL(d, n); \ @@ -2918,7 +2919,7 @@ bool MainFrame::InitMore(void) #ifndef __WXMSW__ cb->Hide(); #endif - getcbb("SyncGameAudio", synchronize); + getcbi("SyncGameAudio", synchronize); getsl("Buffers", gopts.audio_buffers); sound_config_handler.bufs = sl; getlab("BuffersInfo"); @@ -2984,7 +2985,7 @@ bool MainFrame::InitMore(void) cb->SetValidator(wxBoolIntValidator(&gopts.default_stick, i + 1)); wxWindow *prev = NULL, *prevp = NULL; for(int j = 0; j < NUM_KEYS; j++) { - wxJoyKeyTextCtrl *tc = XRCCTRL_D(*w, joynames[j], wxJoyKeyTextCtrl); + wxJoyKeyTextCtrl *tc = XRCCTRL_D(*w, wxString::FromUTF8(joynames[j]), wxJoyKeyTextCtrl); CheckThrowXRCError(tc,ToString(joynames[j])); wxWindow *p = tc->GetParent(); if(p == prevp) @@ -3140,7 +3141,7 @@ bool MainFrame::InitMore(void) #endif // delayed fullscreen - if(wxGetApp().pending_fullscreen || gopts.fullscreen) + if(wxGetApp().pending_fullscreen || fullScreen) panel->ShowFullScreen(true); #ifndef NO_LINK diff --git a/src/wx/openal.cpp b/src/wx/openal.cpp index 0601f634..ad537934 100644 --- a/src/wx/openal.cpp +++ b/src/wx/openal.cpp @@ -282,7 +282,7 @@ void OpenAL::write(u16 * finalWave, int length) if( nBuffersProcessed == gopts.audio_buffers ) { // we only want to know about it when we are emulating at full speed or faster: - if( ( gopts.throttle >= 100 ) || ( gopts.throttle == 0 ) ) { + if( ( throttle >= 100 ) || ( throttle == 0 ) ) { if( systemVerbose & VERBOSE_SOUNDOUTPUT ) { static unsigned int i = 0; log( "OpenAL: Buffers were not refilled fast enough (i=%i)\n", i++ ); @@ -290,7 +290,7 @@ void OpenAL::write(u16 * finalWave, int length) } } - if (!speedup && synchronize && !gopts.throttle && !gba_joybus_active) { + if (!speedup && synchronize && !throttle && !gba_joybus_active) { // wait until at least one buffer has finished while( nBuffersProcessed == 0 ) { winlog( " waiting...\n" ); diff --git a/src/wx/opts.cpp b/src/wx/opts.cpp index 6a5586d0..e707f085 100644 --- a/src/wx/opts.cpp +++ b/src/wx/opts.cpp @@ -1,6 +1,8 @@ #include "wxvbam.h" #include #include +#include "../common/ConfigManager.h" + /* * disableSfx(F) -> cpuDisableSfx * priority(2) -> threadPriority @@ -99,13 +101,13 @@ const int num_def_accels = sizeof(default_accels)/sizeof(default_accels[0]); // Note: this must match GUI widget names or GUI won't work // This table's order determines tab order as well -const wxChar * const joynames[NUM_KEYS] = { - wxT("Up"), wxT("Down"), wxT("Left"), wxT("Right"), - wxT("A"), wxT("B"), wxT("L"), wxT("R"), - wxT("Select"), wxT("Start"), - wxT("MotionUp"), wxT("MotionDown"), wxT("MotionLeft"), wxT("MotionRight"), - wxT("AutoA"), wxT("AutoB"), - wxT("Speed"), wxT("Capture"), wxT("GS") +const char * const joynames[NUM_KEYS] = { + ("Up"), ("Down"), ("Left"), ("Right"), + ("A"), ("B"), ("L"), ("R"), + ("Select"), ("Start"), + ("MotionUp"), ("MotionDown"), ("MotionLeft"), ("MotionRight"), + ("AutoA"), ("AutoB"), + ("Speed"), ("Capture"), ("GS") }; wxJoyKeyBinding defkeys[NUM_KEYS * 2] = { @@ -126,25 +128,61 @@ wxAcceleratorEntry_v sys_accels; // Note: this table must be sorted in option name order // Both for better user display and for (fast) searching by name opt_desc opts[] = { - + // Core +#ifdef MMX + INTOPT("preferences/disableMMX", wxTRANSLATE("Enable MMX"), disableMMX, 0, 1), +#endif + INTOPT("preferences/disableStatus", wxTRANSLATE("Disable on-screen status messages"), disableStatusMessages, 0, 1), + INTOPT("preferences/fullScreen", wxTRANSLATE("Enter fullscreen mode at startup"), fullScreen, 0, 1), + INTOPT("preferences/maxScale", wxTRANSLATE("Maximum scale factor (0 = no limit)"), maxScale, 0, 100), + INTOPT("preferences/showSpeedTransparent", wxTRANSLATE("Draw on-screen messages transparently"), showSpeedTransparent, 0, 1), + INTOPT("preferences/vsync", wxTRANSLATE("Wait for vertical sync"), vsync, 0, 1), + INTOPT("preferences/agbPrint", wxTRANSLATE("Enable AGB printer"), agbPrint, 0, 1), + INTOPT("preferences/rtcEnabled", wxTRANSLATE("Enable RTC (vba-over.ini override is rtcEnabled"), rtcEnabled, 0, 1), + ENUMOPT("preferences/saveType", wxTRANSLATE("Native save (\"battery\") hardware type (vba-over.ini override is saveType integer 0-5)"), cpuSaveType, wxTRANSLATE("auto|eeprom|sram|flash|eeprom+sensor|none")), + INTOPT("preferences/useBiosGBA", wxTRANSLATE("Use the specified BIOS file"), useBiosFileGBA, 0, 1), + INTOPT("preferences/pauseWhenInactive", wxTRANSLATE("Pause game when main window loses focus"), pauseWhenInactive, 0, 1), + INTOPT("preferences/synchronize", wxTRANSLATE("Synchronize game to audio"), synchronize, 0, 1), + INTOPT("preferences/fsColorDepth", wxTRANSLATE("Fullscreen mode color depth (0 = any)"), fsColorDepth, 0, 999), + INTOPT("preferences/fsFrequency", wxTRANSLATE("Fullscreen mode frequency (0 = any)"), fsFrequency, 0, 999), + INTOPT("preferences/fsHeight", wxTRANSLATE("Fullscreen mode height (0 = desktop)"), fsHeight, 0, 99999), + INTOPT("preferences/fsWidth", wxTRANSLATE("Fullscreen mode width (0 = desktop)"), fsWidth, 0, 99999), + ENUMOPT("preferences/showSpeed", wxTRANSLATE("Show speed indicator"), showSpeed, wxTRANSLATE("no|percent|detailed")), + INTOPT("preferences/borderAutomatic", wxTRANSLATE("Automatically enable border for Super GameBoy games"), gbBorderAutomatic, 0, 1), + //STROPT("preferences/biosFileGB", wxTRANSLATE("BIOS file to use for GB, if enabled"), wxString::FromUTF8(biosFileNameGB)), + INTOPT("preferences/borderOn", wxTRANSLATE("Always enable border"), gbBorderOn, 0, 1), + ENUMOPT("preferences/emulatorType", wxTRANSLATE("Type of system to emulate"), gbEmulatorType, wxTRANSLATE("auto|gba|gbc|sgb|sgb2|gb")), + INTOPT("preferences/gbFrameSkip", wxTRANSLATE("Skip frames. Values are 0-9 or -1 to skip automatically based on time."), gbFrameSkip, -1, 9), + ENUMOPT("preferences/gbPaletteOption", wxTRANSLATE("The palette to use"), gbPaletteOption, wxTRANSLATE("default|user1|user2")), + //STROPT("preferences/romDirGB", wxTRANSLATE("Directory to look for ROM files"), wxString::FromUTF8(romDirGB)), + INTOPT("preferences/useBiosFileGB", wxTRANSLATE("Use the specified BIOS file for GB"), useBiosFileGB, 0, 1), + //STROPT("preferences/biosFileGBA", wxTRANSLATE("BIOS file to use, if enabled"), wxString::FromUTF8(biosFileNameGBA)), + ENUMOPT("preferences/flashSize", wxTRANSLATE("Flash size (kb) (vba-over.ini override is flashSize in bytes)"), optFlashSize, wxTRANSLATE("64|128")), + INTOPT("preferences/frameSkip", wxTRANSLATE("Skip frames. Values are 0-9 or -1 to skip automatically based on time."), frameSkip, -1, 9), + //STROPT("preferences/romDirGBA", wxTRANSLATE("Directory to look for ROM files"), wxString::FromUTF8(romDirGBA)), + INTOPT("preferences/autoPatch", wxTRANSLATE("Apply IPS/UPS/IPF patches if found"), autoPatch, 0, 1), + //STROPT("preferences/batteryDir", wxTRANSLATE("Directory to store game save files (relative paths are relative to ROM; blank is config dir)"), wxString::FromUTF8(batteryDir)), + INTOPT("preferences/autoSaveCheatList", wxTRANSLATE("Automatically save and load cheat list"), autoSaveLoadCheatList, 0, 1), + ENUMOPT("preferences/captureFormat", wxTRANSLATE("Screen capture file format"), captureFormat, wxTRANSLATE("png|bmp")), + INTOPT("preferences/cheatsEnabled", wxTRANSLATE("Enable cheats"), cheatsEnabled, 0, 1), + //STROPT("preferences/aviRecordDir", wxTRANSLATE("Directory to store A/V and game recordings (relative paths are relative to ROM)"), wxString::FromUTF8(aviRecordDir)), + //STROPT("preferences/screenShotDir", wxTRANSLATE("Directory to store screenshots (relative paths are relative to ROM)"), wxString::FromUTF8(screenShotDir)), + INTOPT("preferences/skipBios", wxTRANSLATE("Skip BIOS initialization"), skipBios, 0, 1), + INTOPT("preferences/throttle", wxTRANSLATE("Throttle game speed, even when accelerated (0-1000%, 0 = disabled)"), throttle, 0, 1000), + INTOPT("preferences/skipSaveGameBattery", wxTRANSLATE("Do not overwrite native (battery) save when loading state"), skipSaveGameBattery, 0, 1), + INTOPT("preferences/useBiosGBC", wxTRANSLATE("Use the specified BIOS file for GBC"), useBiosFileGBC, 0, 1), + //STROPT("preferences/saveDir", wxTRANSLATE("Directory to store saved state files (relative paths are relative to BatteryDir)"), wxString::FromUTF8(saveDir)), + //STROPT("preferences/biosFileGBC", wxTRANSLATE("BIOS file to use for GBC, if enabled"), wxString::FromUTF8(biosFileNameGBC)), + + /// Display BOOLOPT("Display/Bilinear", wxTRANSLATE("Use bilinear filter with 3d renderer"), gopts.bilinear), - BOOLOPT("Display/DisableStatus", wxTRANSLATE("Disable on-screen status messages"), gopts.no_osd_status), -#ifdef MMX - BOOLOPT("Display/EnableMMX", wxTRANSLATE("Enable MMX"), gopts.cpu_mmx), -#endif ENUMOPT("Display/Filter", wxTRANSLATE("Full-screen filter to apply"), gopts.filter, wxTRANSLATE("none|2xsai|super2xsai|supereagle|pixelate|advmame|" L"bilinear|bilinearplus|scanlines|tvmode|hq2x|lq2x|" L"simple2x|simple3x|hq3x|simple4x|hq4x|xbrz|plugin")), STROPT ("Display/FilterPlugin", wxTRANSLATE("Filter plugin library"), gopts.filter_plugin), - BOOLOPT("Display/Fullscreen", wxTRANSLATE("Enter fullscreen mode at startup"), gopts.fullscreen), - INTOPT ("Display/FullscreenDepth", wxTRANSLATE("Fullscreen mode color depth (0 = any)"), gopts.fs_mode.bpp, 0, 999), - INTOPT ("Display/FullscreenFreq", wxTRANSLATE("Fullscreen mode frequency (0 = any)"), gopts.fs_mode.refresh, 0, 999), - INTOPT ("Display/FullscreenHeight", wxTRANSLATE("Fullscreen mode height (0 = desktop)"), gopts.fs_mode.h, 0, 99999), - INTOPT ("Display/FullscreenWidth", wxTRANSLATE("Fullscreen mode width (0 = desktop)"), gopts.fs_mode.w, 0, 99999), ENUMOPT("Display/IFB", wxTRANSLATE("Interframe blending function"), gopts.ifb, wxTRANSLATE("none|smart|motionblur")), - INTOPT ("Display/MaxScale", wxTRANSLATE("Maximum scale factor (0 = no limit)"), gopts.max_scale, 0, 100), INTOPT ("Display/MaxThreads", wxTRANSLATE("Maximum number of threads to run filters in"), gopts.max_threads, 1, 8), #ifdef __WXMSW__ ENUMOPT("Display/RenderMethod", wxTRANSLATE("Render method; if unsupported, simple method will be used"), gopts.render_method, wxTRANSLATE("simple|opengl|cairo|direct3d")), @@ -152,36 +190,22 @@ opt_desc opts[] = { ENUMOPT("Display/RenderMethod", wxTRANSLATE("Render method; if unsupported, simple method will be used"), gopts.render_method, wxTRANSLATE("simple|opengl|cairo")), #endif INTOPT ("Display/Scale", wxTRANSLATE("Default scale factor"), gopts.video_scale, 1, 6), - ENUMOPT("Display/ShowSpeed", wxTRANSLATE("Show speed indicator"), gopts.osd_speed, wxTRANSLATE("no|percent|detailed")), BOOLOPT("Display/Stretch", wxTRANSLATE("Retain aspect ratio when resizing"), gopts.retain_aspect), - BOOLOPT("Display/Transparent", wxTRANSLATE("Draw on-screen messages transparently"), gopts.osd_transparent), - BOOLOPT("Display/Vsync", wxTRANSLATE("Wait for vertical sync"), gopts.vsync), /// GB - BOOLOPT("GB/AutomaticBorder", wxTRANSLATE("Automatically enable border for Super GameBoy games"), gopts.gbBorderAutomatic), STROPT ("GB/BiosFile", wxTRANSLATE("BIOS file to use for GB, if enabled"), gopts.gb_bios), - BOOLOPT("GB/Border", wxTRANSLATE("Always enable border"), gopts.gbBorderOn), - ENUMOPT("GB/EmulatorType", wxTRANSLATE("Type of system to emulate"), gopts.gbEmulatorType, wxTRANSLATE("auto|gba|gbc|sgb|sgb2|gb")), BOOLOPT("GB/EnablePrinter", wxTRANSLATE("Enable printer emulation"), gopts.gbprint), - INTOPT ("GB/FrameSkip", wxTRANSLATE("Skip frames. Values are 0-9 or -1 to skip automatically based on time."), gopts.gb_frameskip, -1, 9), STROPT ("GB/GBCBiosFile", wxTRANSLATE("BIOS file to use for GBC, if enabled"), gopts.gbc_bios), - BOOLOPT("GB/GBCUseBiosFile", wxTRANSLATE("Use the specified BIOS file for GBC"), gopts.gbc_use_bios), BOOLOPT("GB/LCDColor", wxTRANSLATE("Emulate washed colors of LCD"), gopts.gbcColorOption), - ENUMOPT("GB/Palette", wxTRANSLATE("The palette to use"), gopts.gbPaletteOption, wxTRANSLATE("default|user1|user2")), { wxT("GB/Palette0"), wxTRANSLATE("The default palette, as 8 comma-separated 4-digit hex integers (rgb555).") }, { wxT("GB/Palette1"), wxTRANSLATE("The first user palette, as 8 comma-separated 4-digit hex integers (rgb555).") }, { wxT("GB/Palette2"), wxTRANSLATE("The second user palette, as 8 comma-separated 4-digit hex integers (rgb555).") }, BOOLOPT("GB/PrintAutoPage", wxTRANSLATE("Automatically gather a full page before printing"), gopts.print_auto_page), BOOLOPT("GB/PrintScreenCap", wxTRANSLATE("Automatically save printouts as screen captures with -print suffix"), gopts.print_screen_cap), STROPT ("GB/ROMDir", wxTRANSLATE("Directory to look for ROM files"), gopts.gb_rom_dir), - BOOLOPT("GB/UseBiosFile", wxTRANSLATE("Use the specified BIOS file for GB"), gopts.gb_use_bios), /// GBA - BOOLOPT("GBA/AGBPrinter", wxTRANSLATE("Enable AGB printer"), gopts.agbprint), STROPT ("GBA/BiosFile", wxTRANSLATE("BIOS file to use, if enabled"), gopts.gba_bios), - BOOLOPT("GBA/EnableRTC", wxTRANSLATE("Enable RTC (vba-over.ini override is rtcEnabled"), gopts.rtc), - ENUMOPT("GBA/FlashSize", wxTRANSLATE("Flash size (kb) (vba-over.ini override is flashSize in bytes)"), gopts.flash_size, wxTRANSLATE("64|128")), - INTOPT ("GBA/FrameSkip", wxTRANSLATE("Skip frames. Values are 0-9 or -1 to skip automatically based on time."), gopts.gba_frameskip, -1, 9), #ifndef NO_LINK BOOLOPT("GBA/Joybus", wxTRANSLATE("Enable joybus"), gopts.gba_joybus_enabled), STROPT ("GBA/JoybusHost", wxTRANSLATE("Joybus host address"), gopts.joybus_host), @@ -193,26 +217,16 @@ opt_desc opts[] = { INTOPT ("GBA/LinkTimeout", wxTRANSLATE("Link timeout (ms)"), gopts.linktimeout, 0, 9999999), #endif STROPT ("GBA/ROMDir", wxTRANSLATE("Directory to look for ROM files"), gopts.gba_rom_dir), - ENUMOPT("GBA/SaveType", wxTRANSLATE("Native save (\"battery\") hardware type (vba-over.ini override is saveType integer 0-5)"), gopts.save_type, wxTRANSLATE("auto|eeprom|sram|flash|eeprom+sensor|none")), - BOOLOPT("GBA/UseBiosFile", wxTRANSLATE("Use the specified BIOS file"), gopts.gba_use_bios), /// General - BOOLOPT("General/ApplyPatches", wxTRANSLATE("Apply IPS/UPS/IPF patches if found"), gopts.apply_patches), BOOLOPT("General/AutoLoadLastState", wxTRANSLATE("Automatically load last saved state"), gopts.autoload_state), - BOOLOPT("General/AutoSaveCheatList", wxTRANSLATE("Automatically save and load cheat list"), gopts.autoload_cheats), STROPT ("General/BatteryDir", wxTRANSLATE("Directory to store game save files (relative paths are relative to ROM; blank is config dir)"), gopts.battery_dir), - ENUMOPT("General/CaptureFormat", wxTRANSLATE("Screen capture file format"), gopts.cap_format, wxTRANSLATE("png|bmp")), - BOOLOPT("General/EnableCheats", wxTRANSLATE("Enable cheats"), gopts.cheatsEnabled), BOOLOPT("General/FreezeRecent", wxTRANSLATE("Freeze recent load list"), gopts.recent_freeze), - BOOLOPT("General/PauseWhenInactive", wxTRANSLATE("Pause game when main window loses focus"), gopts.defocus_pause), STROPT ("General/RecordingDir", wxTRANSLATE("Directory to store A/V and game recordings (relative paths are relative to ROM)"), gopts.recording_dir), INTOPT ("General/RewindInterval", wxTRANSLATE("Number of seconds between rewind snapshots (0 to disable)"), gopts.rewind_interval, 0, 600), STROPT ("General/ScreenshotDir", wxTRANSLATE("Directory to store screenshots (relative paths are relative to ROM)"), gopts.scrshot_dir), - BOOLOPT("General/SkipBios", wxTRANSLATE("Skip BIOS initialization"), gopts.skipBios), STROPT ("General/StateDir", wxTRANSLATE("Directory to store saved state files (relative paths are relative to BatteryDir)"), gopts.state_dir), - BOOLOPT("General/StateLoadNoBattery", wxTRANSLATE("Do not overwrite native (battery) save when loading state"), gopts.skipSaveGameBattery), BOOLOPT("General/StateLoadNoCheat", wxTRANSLATE("Do not overwrite cheat list when loading state"), gopts.skipSaveGameCheats), - INTOPT ("General/Throttle", wxTRANSLATE("Throttle game speed, even when accelerated (0-1000%, 0 = disabled)"), gopts.throttle, 0, 1000), /// Joypad { wxT("Joypad/*/*"), wxTRANSLATE("The parameter Joypad//