diff --git a/JGE/src/iOS/EAGLView.m b/JGE/src/iOS/EAGLView.m index 4c35dcc14..ffef6f9f0 100755 --- a/JGE/src/iOS/EAGLView.m +++ b/JGE/src/iOS/EAGLView.m @@ -383,6 +383,11 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170 return newLocation; } +-(void)resetInput +{ + g_engine->ResetInput(); +} + - (void)handlePanMotion: (UIPanGestureRecognizer *) panGesture { @@ -404,6 +409,7 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170 { CGPoint v2 = [panGesture velocityInView: self]; BOOL isVerticalSwipe = (fabsf(v2.x) > fabsf( v2.y)) ? NO : YES; + g_engine->LeftClicked(-1, -1); if ( !isVerticalSwipe ) { @@ -419,6 +425,8 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170 else g_engine->HoldKey_NoRepeat( JGE_BTN_DOWN ); } + [self performSelector: @selector(resetInput) withObject: nil afterDelay: 0.1]; + } } } @@ -498,12 +506,14 @@ static NSString *_MY_AD_WHIRL_APPLICATION_KEY_IPAD = @"2e70e3f3da40408588b9a3170 { g_engine->HoldKey_NoRepeat(JGE_BTN_CTRL); } + [self performSelector:@selector(resetInput) withObject: nil afterDelay: 0.1]; } - (void)displayGameMenu { g_engine->LeftClicked(-1, -1); // set the click pressed to offscreen g_engine->HoldKey_NoRepeat( JGE_BTN_MENU); + [self performSelector:@selector(resetInput) withObject: nil afterDelay: 0.1]; } - (void)handleMenuWithLongPress:(UILongPressGestureRecognizer *)recognizer { diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index 3f7534211..ad9ca1896 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -186,6 +186,8 @@ void GameStateDuel::Start() } deckmenu->Add(MENUITEM_CANCEL, "Main Menu", "Return to Main Menu"); } + + mEngine->ResetInput(); } void GameStateDuel::initRand(unsigned int seed) @@ -710,7 +712,8 @@ void GameStateDuel::Render() mFont->SetColor(ARGB(255,255,255,255)); mFont->DrawString(buffer, SCREEN_WIDTH / 2, 0, JGETEXT_CENTER); } - if (menu) menu->Render(); + if (menu) + menu->Render(); } } diff --git a/projects/mtg/wagic.xcodeproj/project.pbxproj b/projects/mtg/wagic.xcodeproj/project.pbxproj index 0b363b0ff..2fc27e955 100755 --- a/projects/mtg/wagic.xcodeproj/project.pbxproj +++ b/projects/mtg/wagic.xcodeproj/project.pbxproj @@ -2560,7 +2560,7 @@ armv6, "$(ARCHS_STANDARD_32_BIT)", ); - CODE_SIGN_IDENTITY = "iPhone Distribution: Michael Nguyen"; + CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -2590,7 +2590,7 @@ "-Wl", ); PRODUCT_NAME = wagic; - PROVISIONING_PROFILE = "6877A0A0-FD2E-42FA-823A-7CD9B1E8E864"; + PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES;