Skip to content

Commit

Permalink
detect SDL version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Jul 19, 2024
1 parent 6f42bf1 commit 0156af4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions toxblinkenwall/toxblinkenwall.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,15 +698,14 @@ static int gen_display_yuvtex_init(void *gen_display_st, int width, int height)
}
#if SDL_MAJOR_VERSION < 3
// SDL version 2.x
int res_scale = SDL_SetTextureScaleMode(st->texture, SDL_ScaleModeBest);
//int res_scale = SDL_SetTextureScaleMode(st->texture, SDL_ScaleModeBest);
//if (res_scale != 0) {
// dbg(0, "SDL:SDL_SetTextureScaleMode SDL_Error\n");
// return 1;
//}
#else
// SDL version 3.x
// int res_scale = SDL_SetTextureScaleMode(st->texture, SDL_SCALEMODE_BEST);
#endif
if (res_scale != 0) {
dbg(0, "SDL:SDL_SetTextureScaleMode SDL_Error\n");
return 1;
}
// SDL_SetTextureBlendMode(st->texture, SDL_BLENDMODE_NONE);
return 0;
}
Expand Down

0 comments on commit 0156af4

Please sign in to comment.