mirror of
https://github.com/libretro/snes9x.git
synced 2024-12-14 04:28:36 +00:00
Save rewind variables to config file. Rename rewind variables to fit port style. Set default rewind buffer to 0.
This commit is contained in:
parent
5dd5d9ba74
commit
7223e2283e
@ -175,9 +175,9 @@ Snes9xConfig::load_defaults (void)
|
||||
netplay_last_host [0] = '\0';
|
||||
netplay_last_port = 6096;
|
||||
modal_dialogs = 1;
|
||||
|
||||
rewindGranularity = 5;
|
||||
rewindBufferSize = 150;
|
||||
|
||||
rewind_granularity = 5;
|
||||
rewind_buffer_size = 0;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
sync_to_vblank = 1;
|
||||
@ -328,6 +328,9 @@ Snes9xConfig::save_config_file (void)
|
||||
xml_out_int (xml, "hw_accel", hw_accel);
|
||||
xml_out_int (xml, "bilinear_filter", bilinear_filter);
|
||||
|
||||
xml_out_int (xml, "rewind_buffer_size", rewind_buffer_size);
|
||||
xml_out_int (xml, "rewind_granularity", rewind_granularity);
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
xml_out_int (xml, "sync_to_vblank", sync_to_vblank);
|
||||
xml_out_int (xml, "sync_every_frame", sync_every_frame);
|
||||
@ -841,6 +844,14 @@ Snes9xConfig::set_option (const char *name, const char *value)
|
||||
{
|
||||
Settings.SoundSync = atoi (value) ? 1 : 0;
|
||||
}
|
||||
else if (!strcasecmp (name, "rewind_buffer_size"))
|
||||
{
|
||||
rewind_buffer_size = CLAMP (atoi (value), 0, 2000);
|
||||
}
|
||||
else if (!strcasecmp (name, "rewind_granularity"))
|
||||
{
|
||||
rewind_granularity = CLAMP (atoi (value), 0, 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (stderr, _("bad option name: %s\n"), name);
|
||||
|
@ -134,8 +134,8 @@ class Snes9xConfig
|
||||
int pointer_is_visible;
|
||||
struct timeval pointer_timestamp;
|
||||
|
||||
unsigned int rewindGranularity;
|
||||
unsigned int rewindBufferSize;
|
||||
unsigned int rewind_granularity;
|
||||
unsigned int rewind_buffer_size;
|
||||
|
||||
#ifdef USE_XRANDR
|
||||
XRRScreenConfiguration *xrr_config;
|
||||
|
@ -222,10 +222,10 @@ S9xOpenROM (const char *rom_filename)
|
||||
|
||||
CPU.Flags = flags;
|
||||
|
||||
if (gui_config->rewindBufferSize)
|
||||
if (gui_config->rewind_buffer_size)
|
||||
{
|
||||
printf("Setting buffer size to %u\n", gui_config->rewindBufferSize * 1024 * 1024);
|
||||
stateMan.init(gui_config->rewindBufferSize * 1024 * 1024);
|
||||
printf ("Using rewind buffer of %uMB\n", gui_config->rewind_buffer_size);
|
||||
stateMan.init (gui_config->rewind_buffer_size * 1024 * 1024);
|
||||
}
|
||||
|
||||
S9xROMLoaded ();
|
||||
@ -367,7 +367,7 @@ S9xIdleFunc (gpointer data)
|
||||
|
||||
if(top_level->user_rewind)
|
||||
top_level->user_rewind = stateMan.pop();
|
||||
else if(IPPU.TotalEmulatedFrames % gui_config->rewindGranularity == 0)
|
||||
else if(IPPU.TotalEmulatedFrames % gui_config->rewind_granularity == 0)
|
||||
stateMan.push();
|
||||
|
||||
static int muted_from_turbo = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user