+
+ if (Settings.perfect_vsync != prev_vsync || (Settings.perfect_vsync && prev_pal != PAL))
+ {
+ if (Settings.perfect_vsync)
+ {
+ set_LCD_custom_rate(PAL ? LCDR_100_02 : LCDR_120_20);
+ prev_pal = PAL;
+ }
+ else
+ {
+ unset_LCD_custom_rate();
+ }
+ prev_vsync = Settings.perfect_vsync;
+ }