فهرست منبع

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.
Ryan C. Gordon 3 هفته پیش
والد
کامیت
b00b08f832
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/events/SDL_mouse.c

+ 2 - 0
src/events/SDL_mouse.c

@@ -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) {