src/video/uikit/SDL_uikitview.m
changeset 8983 21f5923cfd15
parent 8891 7b6472f1b7ba
child 9487 f9fbc2d1edb0
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Mon Jul 07 10:42:19 2014 -0700
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Mon Jul 07 11:00:25 2014 -0700
     1.3 @@ -91,10 +91,10 @@
     1.4              CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
     1.5  
     1.6              /* send moved event */
     1.7 -            SDL_SendMouseMotion(NULL, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
     1.8 +            SDL_SendMouseMotion(self->viewcontroller.window, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
     1.9  
    1.10              /* send mouse down event */
    1.11 -            SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
    1.12 +            SDL_SendMouseButton(self->viewcontroller.window, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
    1.13  
    1.14              leftFingerDown = touch;
    1.15          }
    1.16 @@ -130,7 +130,7 @@
    1.17      while(touch) {
    1.18          if (touch == leftFingerDown) {
    1.19              /* send mouse up */
    1.20 -            SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
    1.21 +            SDL_SendMouseButton(self->viewcontroller.window, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
    1.22              leftFingerDown = nil;
    1.23          }
    1.24  
    1.25 @@ -173,7 +173,7 @@
    1.26              CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
    1.27  
    1.28              /* send moved event */
    1.29 -            SDL_SendMouseMotion(NULL, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
    1.30 +            SDL_SendMouseMotion(self->viewcontroller.window, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
    1.31          }
    1.32  
    1.33          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];