Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow grabing mouse by locking its position
  • Loading branch information
pmandin committed Sep 12, 2006
1 parent 52bcde7 commit 4f81cf1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/video/gem/SDL_gemmouse.c
Expand Up @@ -167,10 +167,12 @@ GEM_CheckMouseMode(_THIS)
{
/* If the mouse is hidden and input is grabbed, we use relative mode */
if ((!(SDL_cursorstate & CURSOR_VISIBLE)) &&
/*(this->input_grab != SDL_GRAB_OFF) && *//* Damn GEM can not grab */
(this->input_grab != SDL_GRAB_OFF) &&
(SDL_GetAppState() & SDL_APPACTIVE)) {
SDL_AtariXbios_LockMousePosition(SDL_TRUE);
GEM_mouse_relative = SDL_TRUE;
} else {
SDL_AtariXbios_LockMousePosition(SDL_FALSE);
GEM_mouse_relative = SDL_FALSE;
graf_mouse(M_ON, NULL);
}
Expand Down
6 changes: 5 additions & 1 deletion src/video/gem/SDL_gemwm.c
Expand Up @@ -113,7 +113,11 @@ GEM_IconifyWindow(_THIS)
SDL_GrabMode
GEM_GrabInput(_THIS, SDL_GrabMode mode)
{
return SDL_GRAB_OFF;
if (this->screen == NULL) {
return SDL_GRAB_OFF;
}

return mode;
}

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 4f81cf1

Please sign in to comment.