SDL: Fix vsync on Pandora

This commit is contained in:
Jeffrey Pfau 2015-10-12 00:00:16 -07:00
parent 808855f377
commit b597d5197b
1 changed files with 3 additions and 3 deletions

View File

@ -92,14 +92,14 @@ void GBASDLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* render
}
if (GBASyncWaitFrameStart(&context->sync)) {
int arg = 0;
ioctl(renderer->fb, FBIO_WAITFORVSYNC, &arg);
struct fb_var_screeninfo info;
ioctl(renderer->fb, FBIOGET_VSCREENINFO, &info);
info.yoffset = VIDEO_VERTICAL_PIXELS * renderer->odd;
ioctl(renderer->fb, FBIOPAN_DISPLAY, &info);
int arg = 0;
ioctl(renderer->fb, FBIO_WAITFORVSYNC, &arg);
renderer->odd = !renderer->odd;
renderer->d.outputBuffer = renderer->base[renderer->odd];
}