Only re-grab the mouse if the user clicks on the emulator screen
This commit is contained in:
parent
87114c325d
commit
135c8b2de8
1 changed files with 3 additions and 1 deletions
|
@ -1605,7 +1605,7 @@ void process_event(SDL_Event event)
|
|||
case SDL_WINDOWEVENT_ENTER:
|
||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
mouseinside = true;
|
||||
set_mouse_grab(true);
|
||||
|
||||
break;
|
||||
case SDL_WINDOWEVENT_LEAVE:
|
||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||
|
@ -1758,6 +1758,8 @@ void process_event(SDL_Event event)
|
|||
break;
|
||||
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
if (mouseinside && event.button.button == SDL_BUTTON_LEFT)
|
||||
set_mouse_grab(true);
|
||||
if (currprefs.jports[0].id == JSEM_MICE || currprefs.jports[1].id == JSEM_MICE)
|
||||
{
|
||||
if (event.button.button == SDL_BUTTON_LEFT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue