From f6bf7d650e205e6255047bb62702335b0d192f04 Mon Sep 17 00:00:00 2001 From: Randolph Burt Date: Sat, 19 Mar 2016 13:01:21 +0000 Subject: [PATCH] Minor change to game.exit() logic * Revert back to preprocessor directive to exclude call to game.exit() for iOS. --- .../example/spine-monogame-example.csproj | 16 ++++++++++------ spine-xna/example/src/ExampleGame.cs | 5 ++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj b/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj index 881b20537..161c5ad61 100644 --- a/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj +++ b/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj @@ -17,16 +17,17 @@ full false bin\iPhoneSimulator\Debug - DEBUG; + DEBUG;IOS prompt 4 false None Entitlements.plist true + iPhone Developer + i386 - full true bin\iPhoneSimulator\Release prompt @@ -34,13 +35,14 @@ None false Entitlements.plist + IOS true full false bin\iPhone\Debug - DEBUG; + DEBUG;IOS prompt 4 false @@ -48,9 +50,10 @@ true iPhone Developer ARMv7 + + - full true bin\iPhone\Release prompt @@ -59,9 +62,9 @@ false iPhone Developer ARMv7, ARM64 + IOS - full true bin\iPhone\Ad-Hoc prompt @@ -72,9 +75,9 @@ Automatic:AdHoc iPhone Distribution ARMv7, ARM64 + IOS - full true bin\iPhone\AppStore prompt @@ -84,6 +87,7 @@ false Automatic:AppStore ARMv7, ARM64 + IOS diff --git a/spine-xna/example/src/ExampleGame.cs b/spine-xna/example/src/ExampleGame.cs index bf1200c37..b0527d781 100644 --- a/spine-xna/example/src/ExampleGame.cs +++ b/spine-xna/example/src/ExampleGame.cs @@ -137,7 +137,10 @@ namespace Spine { protected override void Update (GameTime gameTime) { // TODO: Add your update logic here - +#if (!WINDOWS_STOREAPP || WINDOWS_PHONE81) && !IOS + if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) + this.Exit(); +#endif base.Update(gameTime); }