May fix Vsync broken previously

This commit is contained in:
raven02 2013-08-06 23:08:57 +08:00
parent c71b304ba1
commit 6798762eaa

View File

@ -171,7 +171,7 @@ static const u8 flushBeforeCommandList[] = {
GLES_GPU::GLES_GPU()
: resized_(false) {
lastVsync_ = g_Config.bVSync;
lastVsync_ = g_Config.bVSync ? 1 : 0;
if (gl_extensions.EXT_swap_control_tear) {
// See http://developer.download.nvidia.com/opengl/specs/WGL_EXT_swap_control_tear.txt
glstate.SetVSyncInterval(g_Config.bVSync ? -1 :0);
@ -258,7 +258,7 @@ void GLES_GPU::DumpNextFrame() {
void GLES_GPU::BeginFrame() {
// Turn off vsync when unthrottled
int desiredVSyncInterval = g_Config.bVSync;
int desiredVSyncInterval = g_Config.bVSync ? 1 : 0;
if ((PSP_CoreParameter().unthrottle) || (PSP_CoreParameter().fpsLimit == 1))
desiredVSyncInterval = 0;
if (desiredVSyncInterval != lastVsync_) {