~random-stuff/random-stuff/snes9x-OLD

« back to all changes in this revision

Viewing changes to gtk/src/gtk_config.cpp

  • Committer: Brandon Wright
  • Date: 2016-10-09 02:33:34 UTC
  • Revision ID: git-v1:7223e2283efc0077a7741e4fb30ef9122d4e931a
Save rewind variables to config file. Rename rewind variables to fit port style. Set default rewind buffer to 0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
    netplay_last_host [0] = '\0';
176
176
    netplay_last_port = 6096;
177
177
    modal_dialogs = 1;
178
 
    
179
 
    rewindGranularity = 5;
180
 
    rewindBufferSize = 150;
 
178
 
 
179
    rewind_granularity = 5;
 
180
    rewind_buffer_size = 0;
181
181
 
182
182
#ifdef USE_OPENGL
183
183
    sync_to_vblank = 1;
328
328
    xml_out_int (xml, "hw_accel", hw_accel);
329
329
    xml_out_int (xml, "bilinear_filter", bilinear_filter);
330
330
 
 
331
    xml_out_int (xml, "rewind_buffer_size", rewind_buffer_size);
 
332
    xml_out_int (xml, "rewind_granularity", rewind_granularity);
 
333
 
331
334
#ifdef USE_OPENGL
332
335
    xml_out_int (xml, "sync_to_vblank", sync_to_vblank);
333
336
    xml_out_int (xml, "sync_every_frame", sync_every_frame);
841
844
    {
842
845
        Settings.SoundSync = atoi (value) ? 1 : 0;
843
846
    }
 
847
    else if (!strcasecmp (name, "rewind_buffer_size"))
 
848
    {
 
849
        rewind_buffer_size = CLAMP (atoi (value), 0, 2000);
 
850
    }
 
851
    else if (!strcasecmp (name, "rewind_granularity"))
 
852
    {
 
853
        rewind_granularity = CLAMP (atoi (value), 0, 600);
 
854
    }
844
855
    else
845
856
    {
846
857
        fprintf (stderr, _("bad option name: %s\n"), name);