Do not allow mouse capturing if no mouse configured.

Fix resetting mouse type to NONE.
This commit is contained in:
waltje
2018-03-18 21:09:07 -05:00
parent d40526144c
commit 110070466a
3 changed files with 10 additions and 15 deletions

View File

@@ -8,7 +8,7 @@
*
* Implement the user Interface module.
*
* Version: @(#)win_ui.c 1.0.5 2018/03/10
* Version: @(#)win_ui.c 1.0.6 2018/03/18
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -1088,6 +1088,9 @@ plat_mouse_capture(int on)
{
RECT rect;
/* Do not try to capture the mouse if no mouse configured. */
if (mouse_type == MOUSE_TYPE_NONE) return;
if (on && !mouse_capture) {
/* Enable the in-app mouse. */
GetClipCursor(&oldclip);