mouse fix

This commit is contained in:
p.kosyh 2009-09-18 04:48:34 +00:00
parent 826a44be81
commit ed54987fe6
2 changed files with 2 additions and 3 deletions

View file

@ -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;

View file

@ -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;