src/video/uikit/SDL_uikitview.m
branchiOS-improvements
changeset 9529 4bf9830d8153
parent 9527 bbd9326ecacf
child 9532 318042c16b76
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Sun Nov 23 23:29:24 2014 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Thu Nov 27 20:25:54 2014 -0400
     1.3 @@ -46,7 +46,7 @@
     1.4  
     1.5  }
     1.6  
     1.7 -@synthesize viewcontroller;
     1.8 +@synthesize sdlwindow;
     1.9  
    1.10  - (id)initWithFrame:(CGRect)frame
    1.11  {
    1.12 @@ -92,10 +92,10 @@
    1.13              CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
    1.14  
    1.15              /* send moved event */
    1.16 -            SDL_SendMouseMotion(self.viewcontroller.window, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
    1.17 +            SDL_SendMouseMotion(sdlwindow, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
    1.18  
    1.19              /* send mouse down event */
    1.20 -            SDL_SendMouseButton(self.viewcontroller.window, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
    1.21 +            SDL_SendMouseButton(sdlwindow, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
    1.22  
    1.23              leftFingerDown = touch;
    1.24          }
    1.25 @@ -111,7 +111,7 @@
    1.26      for (UITouch *touch in touches) {
    1.27          if (touch == leftFingerDown) {
    1.28              /* send mouse up */
    1.29 -            SDL_SendMouseButton(self.viewcontroller.window, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
    1.30 +            SDL_SendMouseButton(sdlwindow, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
    1.31              leftFingerDown = nil;
    1.32          }
    1.33  
    1.34 @@ -138,7 +138,7 @@
    1.35              CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
    1.36  
    1.37              /* send moved event */
    1.38 -            SDL_SendMouseMotion(self.viewcontroller.window, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
    1.39 +            SDL_SendMouseMotion(sdlwindow, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
    1.40          }
    1.41  
    1.42          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];