mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Fix regression: Linear filter persistence
This fixes #1013 by axing the use of SDL_HINT_RENDER_SCALE_QUALITY and instead using SDL_SetTextureScaleMode. The hint is unwieldy to use, and since #923, has resulted in a regression where starting the game in filtered mode then switching to nearest results in scaled textures still being filtered. The proper solution is to use SDL_SetTextureScaleMode on the two textures that are drawn to the final screen: gameTexture and tempShakeTexture.
This commit is contained in:
@@ -194,6 +194,16 @@ void Graphics::create_buffers(void)
|
||||
#undef CREATE_SCROLL_TEXTURE
|
||||
#undef CREATE_TEXTURE
|
||||
#undef CREATE_TEXTURE_WITH_DIMENSIONS
|
||||
|
||||
SDL_SetTextureScaleMode(
|
||||
gameTexture,
|
||||
gameScreen.isFiltered ? SDL_ScaleModeLinear : SDL_ScaleModeNearest
|
||||
);
|
||||
|
||||
SDL_SetTextureScaleMode(
|
||||
tempShakeTexture,
|
||||
gameScreen.isFiltered ? SDL_ScaleModeLinear : SDL_ScaleModeNearest
|
||||
);
|
||||
}
|
||||
|
||||
void Graphics::destroy_buffers(void)
|
||||
|
||||
Reference in New Issue
Block a user