コード例 #1
0
ファイル: util.c プロジェクト: kendallb/scitech-mgl
/****************************************************************************
REMARKS:
Initialise the mouse driver
****************************************************************************/
void InitMouse(
    int xRes,
    int yRes)
{
    EVT_setMouseRange(xRes-1,yRes-1);
    EVT_setMousePos(xRes/2,yRes/2);
}
コード例 #2
0
ファイル: window.cpp プロジェクト: esrrhs/fuck-music-player
void wxWindowMGL::WarpPointer(int x, int y)
{
    int w, h;
    wxDisplaySize(&w, &h);

    ClientToScreen(&x, &y);
    if ( x < 0 )
        x = 0;
    if ( y < 0 )
        y = 0;
    if ( x >= w )
        x = w-1;
    if ( y >= h )
        y = h-1;

    EVT_setMousePos(x, y);
}