#include "rev.h"
;
+extern uint8 PAL;
+
int CLImain(int argc, char *argv[]);
DSETTINGS Settings;
AC(Settings.mmuhack),
AC(Settings.ramtimings),
AC(Settings.gamma),
- // TODO
+ AC(Settings.perfect_vsync),
+ AC(Settings.accurate_mode),
ENDCFGSTRUCT
};
ret = CLImain(argc,argv);
- // unscale the screen, in case this is bad.
- gp2x_video_RGB_setscaling(0, 320, 240);
+ // unscale the screen, in case it is bad.
+ gp2x_video_RGB_setscaling(320, 240);
if (mmuhack_status > 0)
mmuunhack();
}
}
-void gp2x_cpuclock_gamma_update(void)
+void gp2x_opt_update(void)
{
- static int prev_cpuclock = 200, prev_gamma = 100;
+ static int prev_cpuclock = 200, prev_gamma = 100, prev_vsync = 0, prev_pal = 0;
if (Settings.cpuclock != 0 && Settings.cpuclock != prev_cpuclock)
{
set_FCLK(Settings.cpuclock);
set_gamma(Settings.gamma);
prev_gamma = Settings.gamma;
}
+
+ 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;
+ }
}