Skip to content

Commit

Permalink
Also call wglSwapIntervalEXT when vsync is disabled
Browse files Browse the repository at this point in the history
This should fix vsync staying enabled until a restart after disabling it in PJ64.
  • Loading branch information
ata4 committed Jul 16, 2019
1 parent feb4d26 commit f7cad30
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/plugin/zilmar/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,8 @@ void screen_init(struct n64video_config* config)
msg_warning("Can't create OpenGL 3.3 core context.");
}

if (config->vi.vsync) {
// enable vsync
wglSwapIntervalEXT(1);
}
// enable or disable vsync
wglSwapIntervalEXT(config->vi.vsync ? 1 : 0);
}

void screen_adjust(int32_t width_out, int32_t height_out, int32_t* width, int32_t* height, int32_t* x, int32_t* y)
Expand Down

0 comments on commit f7cad30

Please sign in to comment.