config: replace numeric enable_sync setting with time_sync string

This shouldn't break existing configs. Existing "enable_sync" setings are automatically replaced with an appropriate "time_sync" value. In case "enable_sync" and "time_sync" settings are both present in a configuration file (shouldn't happen without manually editing the config), "time_sync" takes precedence.
This commit is contained in:
David Hrdlička
2018-08-01 18:07:52 +02:00
parent a4f6bfde58
commit c7388eb174
8 changed files with 33 additions and 16 deletions

View File

@@ -202,7 +202,7 @@ win_settings_init(void)
temp_dynarec = cpu_use_dynarec;
#endif
temp_fpu = enable_external_fpu;
temp_sync = enable_sync & TIME_SYNC_ENABLED;
temp_sync = time_sync & TIME_SYNC_ENABLED;
/* Video category */
temp_gfxcard = gfxcard;
@@ -305,7 +305,7 @@ win_settings_changed(void)
i = i || (temp_dynarec != cpu_use_dynarec);
#endif
i = i || (temp_fpu != enable_external_fpu);
i = i || (temp_sync != (enable_sync & TIME_SYNC_ENABLED));
i = i || (temp_sync != (time_sync & TIME_SYNC_ENABLED));
/* Video category */
i = i || (gfxcard != temp_gfxcard);
@@ -403,7 +403,7 @@ win_settings_save(void)
cpu_use_dynarec = temp_dynarec;
#endif
enable_external_fpu = temp_fpu;
enable_sync = temp_sync;
time_sync = temp_sync;
/* Video category */
gfxcard = temp_gfxcard;