v0.9.4: added main code module support for iOS

This commit is contained in:
Evan Debenham
2021-06-25 15:54:04 -04:00
parent 9b63eb5e09
commit d610383717
6 changed files with 39 additions and 8 deletions
@@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.WelcomeScene;
import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Music;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.PlatformSupport;
public class ShatteredPixelDungeon extends Game {
@@ -122,6 +123,16 @@ public class ShatteredPixelDungeon extends Game {
}
@Override
public void finish() {
if (!DeviceCompat.isiOS()) {
super.finish();
} else {
//can't exit on iOS (Apple guidelines), so just go to title screen
switchScene(TitleScene.class);
}
}
public static void switchNoFade(Class<? extends PixelScene> c){
switchNoFade(c, null);
}
@@ -223,7 +223,7 @@ public class WndSettings extends WndTabbed {
add(optScale);
}
if (!DeviceCompat.isDesktop() && PixelScene.maxScreenZoom >= 2) {
if (DeviceCompat.isAndroid() && PixelScene.maxScreenZoom >= 2) {
chkSaver = new CheckBox(Messages.get(this, "saver")) {
@Override
protected void onClick() {