Fixed memory leak in Cocoa mouse code
The video quit call cleans up the mouse cursor driver data, which happens after mouse quit
This commit is contained in:
parent
20693f4ac7
commit
949947d95b
1 changed files with 2 additions and 2 deletions
|
@ -81,6 +81,8 @@ SDL_MouseInit(void)
|
||||||
{
|
{
|
||||||
SDL_Mouse *mouse = SDL_GetMouse();
|
SDL_Mouse *mouse = SDL_GetMouse();
|
||||||
|
|
||||||
|
SDL_zerop(mouse);
|
||||||
|
|
||||||
SDL_AddHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE,
|
SDL_AddHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE,
|
||||||
SDL_MouseNormalSpeedScaleChanged, mouse);
|
SDL_MouseNormalSpeedScaleChanged, mouse);
|
||||||
|
|
||||||
|
@ -587,8 +589,6 @@ SDL_MouseQuit(void)
|
||||||
SDL_free(mouse->clickstate);
|
SDL_free(mouse->clickstate);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_zerop(mouse);
|
|
||||||
|
|
||||||
SDL_DelHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE,
|
SDL_DelHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE,
|
||||||
SDL_MouseNormalSpeedScaleChanged, mouse);
|
SDL_MouseNormalSpeedScaleChanged, mouse);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue