mouse fix
This commit is contained in:
parent
826a44be81
commit
ed54987fe6
|
@ -1839,7 +1839,7 @@ int game_loop(void)
|
|||
while (game_running) {
|
||||
int rc;
|
||||
ev.x = -1;
|
||||
game_cursor(CURSOR_CLEAR); /* release bg */
|
||||
// game_cursor(CURSOR_CLEAR); /* release bg */
|
||||
while ((rc = input(&ev, 1)) == AGAIN);
|
||||
if (rc == -1) {/* close */
|
||||
break;
|
||||
|
|
|
@ -61,7 +61,7 @@ int input(struct inp_event *inp, int wait)
|
|||
}
|
||||
case SDL_ACTIVEEVENT:
|
||||
if (event.active.state & SDL_APPMOUSEFOCUS) {
|
||||
if (event.active.gain)
|
||||
if (event.active.gain)
|
||||
m_focus = 1;
|
||||
else
|
||||
m_focus = 0;
|
||||
|
@ -81,7 +81,6 @@ int input(struct inp_event *inp, int wait)
|
|||
inp->sym = SDL_GetKeyName(event.key.keysym.sym);
|
||||
break;
|
||||
case SDL_MOUSEMOTION:
|
||||
m_focus = 1;
|
||||
inp->type = MOUSE_MOTION;
|
||||
inp->x = event.button.x;
|
||||
inp->y = event.button.y;
|
||||
|
|
Loading…
Reference in a new issue