Fix Portrait mode Exit/Back key

This commit is contained in:
Anthony Calosa
2019-08-28 20:42:06 +08:00
parent 8cef63968c
commit a15a5ad5c3
2 changed files with 5 additions and 5 deletions

View File

@@ -175,7 +175,7 @@ public class Forge implements ApplicationListener {
}
public static void back() {
if(destroyThis)
if(destroyThis && isLandscapeMode())
return;
if (screens.size() < 2) {
exit(false); //prompt to exit if attempting to go back from home screen
@@ -494,7 +494,7 @@ public class Forge implements ApplicationListener {
if(keyCode == Keys.BACK){
if (destroyThis)
deviceAdapter.exit();
else if(onHomeScreen())
else if(onHomeScreen() && isLandscapeMode())
back();
}
if (keyInputAdapter == null) {