Subversion Repositories eduke32

Rev

Rev 4749 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4749 Rev 4753
Line 512... Line 512...
512
#if !defined DEBUGGINGAIDS
512
#if !defined DEBUGGINGAIDS
513
                    if (mousegrab && moustat)
513
                    if (mousegrab && moustat)
514
                        grabmouse_low(!!appactive);
514
                        grabmouse_low(!!appactive);
515
#endif
515
#endif
516
                    rv = -1;
516
                    rv = -1;
-
 
517
-
 
518
                    if (ev.active.state & SDL_APPMOUSEFOCUS)
-
 
519
                        mouseinwindow = ev.active.gain;
517
                }
520
                }
518
                break;
521
                break;
519
522
520
            // SDL_MOUSEMOTION needs to fall through to default... this is just GEKKO processing!
523
            // SDL_MOUSEMOTION needs to fall through to default... this is just GEKKO processing!
521
            case SDL_MOUSEMOTION:
524
            case SDL_MOUSEMOTION:
522
#ifdef GEKKO
525
#ifdef GEKKO
523
                if (appactive && mousegrab)
-
 
524
                {
-
 
525
                    // check if it's a wiimote pointer pretending to be a mouse
526
                // check if it's a wiimote pointer pretending to be a mouse
526
                    if (ev.motion.state & SDL_BUTTON_X2MASK)
527
                if (ev.motion.state & SDL_BUTTON_X2MASK)
527
                    {
528
                {
528
                        // the absolute values are used to draw the crosshair
529
                    // the absolute values are used to draw the crosshair
529
                        mouseabsx = ev.motion.x;
530
                    mouseabsx = ev.motion.x;
Line 531... Line 532...
531
                        // hack: reduce the scale of the "relative" motions
532
                    // hack: reduce the scale of the "relative" motions
532
                        // to make it act more like a real mouse
533
                    // to make it act more like a real mouse
533
                        ev.motion.xrel /= 16;
534
                    ev.motion.xrel /= 16;
534
                        ev.motion.yrel /= 12;
535
                    ev.motion.yrel /= 12;
535
                    }
536
                }
536
                }
-
 
537
#endif
537
#endif
538
            default: // OSD_Printf("Got event (%d)\n", ev.type); break;
538
            default: // OSD_Printf("Got event (%d)\n", ev.type); break;
539
                rv = handleevents_sdlcommon(&ev);
539
                rv = handleevents_sdlcommon(&ev);
540
                break;
540
                break;
541
        }
541
        }