Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 4752 → Rev 4753

/polymer/eduke32/build/src/sdlayer.c
1691,6 → 1691,10
switch (ev->type)
{
case SDL_MOUSEMOTION:
#ifndef GEKKO
mouseabsx = ev->motion.x;
mouseabsy = ev->motion.y;
#endif
// SDL <VER> doesn't handle relative mouse movement correctly yet as the cursor still clips to the
// screen edges
// so, we call SDL_WarpMouse() to center the cursor and ignore the resulting motion event that occurs
1706,8 → 1710,6
#endif
}
}
if (ev.active.state & SDL_APPMOUSEFOCUS)
mouseinwindow = ev.active.gain;
break;
 
case SDL_MOUSEBUTTONDOWN:
1947,6 → 1949,12
windowy = ev.window.data2;
}
break;
case SDL_WINDOWEVENT_ENTER:
mouseinwindow = 1;
break;
case SDL_WINDOWEVENT_LEAVE:
mouseinwindow = 0;
break;
}
break;
 
/polymer/eduke32/build/src/sdlayer12.c
514,6 → 514,9
grabmouse_low(!!appactive);
#endif
rv = -1;
 
if (ev.active.state & SDL_APPMOUSEFOCUS)
mouseinwindow = ev.active.gain;
}
break;
 
520,19 → 523,16
// SDL_MOUSEMOTION needs to fall through to default... this is just GEKKO processing!
case SDL_MOUSEMOTION:
#ifdef GEKKO
if (appactive && mousegrab)
// check if it's a wiimote pointer pretending to be a mouse
if (ev.motion.state & SDL_BUTTON_X2MASK)
{
// check if it's a wiimote pointer pretending to be a mouse
if (ev.motion.state & SDL_BUTTON_X2MASK)
{
// the absolute values are used to draw the crosshair
mouseabsx = ev.motion.x;
mouseabsy = ev.motion.y;
// hack: reduce the scale of the "relative" motions
// to make it act more like a real mouse
ev.motion.xrel /= 16;
ev.motion.yrel /= 12;
}
// the absolute values are used to draw the crosshair
mouseabsx = ev.motion.x;
mouseabsy = ev.motion.y;
// hack: reduce the scale of the "relative" motions
// to make it act more like a real mouse
ev.motion.xrel /= 16;
ev.motion.yrel /= 12;
}
#endif
default: // OSD_Printf("Got event (%d)\n", ev.type); break;