mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-27 10:57:22 +08:00
SDL_test: clear text cache on exit event
This commit is contained in:
committed by
Anonymous Maarten
parent
b4bfb18318
commit
12c0be028e
@@ -2046,6 +2046,8 @@ void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done
|
|||||||
{
|
{
|
||||||
SDL_Window *window = SDL_GetWindowFromID(event->window.windowID);
|
SDL_Window *window = SDL_GetWindowFromID(event->window.windowID);
|
||||||
if (window) {
|
if (window) {
|
||||||
|
/* Clear cache to avoid stale textures */
|
||||||
|
SDLTest_CleanupTextDrawing();
|
||||||
for (i = 0; i < state->num_windows; ++i) {
|
for (i = 0; i < state->num_windows; ++i) {
|
||||||
if (window == state->windows[i]) {
|
if (window == state->windows[i]) {
|
||||||
if (state->targets[i]) {
|
if (state->targets[i]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user