This commit is contained in:
veclavtalica 2025-01-15 06:50:19 +03:00
parent 45b8b21ec3
commit 8233f31269

View File

@ -613,9 +613,9 @@ static bool initialize(void) {
if (!datum_font_filtering.ok) { if (!datum_font_filtering.ok) {
ctx.font_filtering = TEXT_FONT_FILTERING_DEFAULT; ctx.font_filtering = TEXT_FONT_FILTERING_DEFAULT;
} else { } else {
if (SDL_strncmp(datum_font_filtering.u.s, "nearest", sizeof "nearest") == 0) { if (SDL_strncmp(datum_font_filtering.u.s, "nearest", sizeof "nearest" - 1) == 0) {
ctx.font_filtering = TEXTURE_FILTER_NEAREAST; ctx.font_filtering = TEXTURE_FILTER_NEAREAST;
} else if (SDL_strncmp(datum_font_filtering.u.s, "linear", sizeof "nearest") == 0) { } else if (SDL_strncmp(datum_font_filtering.u.s, "linear", sizeof "linear" - 1) == 0) {
ctx.font_filtering = TEXTURE_FILTER_LINEAR; ctx.font_filtering = TEXTURE_FILTER_LINEAR;
} else { } else {
ctx.font_filtering = TEXT_FONT_FILTERING_DEFAULT; ctx.font_filtering = TEXT_FONT_FILTERING_DEFAULT;