diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 7a7bb2e4a..794eafe1e 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -81,6 +81,8 @@ SDL_MouseInit(void) { SDL_Mouse *mouse = SDL_GetMouse(); + SDL_zerop(mouse); + SDL_AddHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE, SDL_MouseNormalSpeedScaleChanged, mouse); @@ -587,8 +589,6 @@ SDL_MouseQuit(void) SDL_free(mouse->clickstate); } - SDL_zerop(mouse); - SDL_DelHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE, SDL_MouseNormalSpeedScaleChanged, mouse);