Ignore:
Timestamp:
Apr 15, 2011, 6:45:45 PM (10 years ago)
Author:
Sam Hocevar
Message:

sdlport: do not hardcode screen size in event handlers, patch courtesy
of Jochen Schleu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/sdlport/event.cpp

    r124 r477  
    374374    x = (x << 16) / mouse_xscale;
    375375    y = (y << 16) / mouse_yscale;
    376     if( x > 319 )
    377     {
    378         x = 319;
    379     }
    380     if( y > 199 )
    381     {
    382         y = 199;
     376    if( x > screen->width() - 1 )
     377    {
     378        x = screen->width() - 1;
     379    }
     380    if( y > screen->height() - 1 )
     381    {
     382        y = screen->height() - 1;
    383383    }
    384384    ev.mouse_move.x = x;
Note: See TracChangeset for help on using the changeset viewer.