Skip to content

Commit

Permalink
Vita: Ensure Vsync is alway correctly set
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 committed Jun 2, 2018
1 parent dd4c603 commit bc32487
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/libgame/sdl.c
Expand Up @@ -827,6 +827,11 @@ static boolean SDLCreateScreen(boolean fullscreen)
vita2d_free_texture(vita_texture->tex);
vita_texture->tex = vita2d_create_empty_texture_format(width, height, SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1BGR);
vita2d_texture_set_filters(vita_texture->tex, min_filter, mag_filter);
if (setup.game_frame_delay == 16) {
vita2d_set_vblank_wait(SDL_TRUE);
} else {
vita2d_set_vblank_wait(SDL_FALSE);
}
#else
sdl_texture_stream = SDL_CreateTexture(sdl_renderer,
SDL_PIXELFORMAT_ARGB8888,
Expand Down Expand Up @@ -1060,6 +1065,12 @@ void SDLSetWindowScalingQuality(char *window_scaling_quality)
vita2d_free_texture(vita_texture->tex);
vita_texture->tex = vita2d_create_empty_texture_format(video.width, video.height, SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1BGR);
vita2d_texture_set_filters(vita_texture->tex, min_filter, mag_filter);
if (setup.game_frame_delay == 16) {
vita2d_set_vblank_wait(SDL_TRUE);
} else {
vita2d_set_vblank_wait(SDL_FALSE);
}

#else
new_texture = SDL_CreateTexture(sdl_renderer,
SDL_PIXELFORMAT_ARGB8888,
Expand Down
1 change: 0 additions & 1 deletion src/screens.c
Expand Up @@ -4623,7 +4623,6 @@ static void execSetupGame_setGameSpeeds()
setup.game_frame_delay = atoi(game_speed_current->identifier);

#if defined(PLATFORM_VITA)
// Vsync is required for perfectly smooth gameplay on Vita in 60fps mode
if (setup.game_frame_delay == 16) {
vita2d_set_vblank_wait(SDL_TRUE);
} else {
Expand Down

0 comments on commit bc32487

Please sign in to comment.