touch: Keep state correct when removing virtual touch devices during quit.

This is probably not strictly necessary, since SDL_InitMouse will zero out
the whole struct to start if SDL is reinitialized, but just in case.
This commit is contained in:
Ryan C. Gordon 2025-03-27 11:58:11 -04:00
parent 09fff161e9
commit b00b08f832
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 2 additions and 0 deletions

View File

@ -1065,10 +1065,12 @@ void SDL_QuitMouse(void)
if (mouse->added_mouse_touch_device) {
SDL_DelTouch(SDL_MOUSE_TOUCHID);
mouse->added_mouse_touch_device = false;
}
if (mouse->added_pen_touch_device) {
SDL_DelTouch(SDL_PEN_TOUCHID);
mouse->added_pen_touch_device = false;
}
if (mouse->CaptureMouse) {