Commit 33659a08 authored by Johnny Jazeix's avatar Johnny Jazeix
Browse files

land_safe, fix crash when pressing back button in android

parent 2c2c495c
...@@ -37,7 +37,7 @@ In higher levels, you can use the right/left keys to rotate the spaceship. By ro ...@@ -37,7 +37,7 @@ In higher levels, you can use the right/left keys to rotate the spaceship. By ro
The landing platform is green if your speed is fine for a safe landing.") The landing platform is green if your speed is fine for a safe landing.")
credit: "" credit: ""
section: "experiments" section: "experiment"
enabled: true //ApplicationInfo.hasShader enabled: true //ApplicationInfo.hasShader
createdInVersion: 6000 createdInVersion: 6000
} }
...@@ -234,12 +234,11 @@ function previousLevel() { ...@@ -234,12 +234,11 @@ function previousLevel() {
function processKeyPress(event) function processKeyPress(event)
{ {
var key = event.key;
event.accepted = true;
if (!items.world.running) { if (!items.world.running) {
event.accepted = false;
return; return;
} }
var key = event.key;
event.accepted = true;
var newAccel = 0; var newAccel = 0;
if (key === Qt.Key_Up || key === Qt.Key_Down) { if (key === Qt.Key_Up || key === Qt.Key_Down) {
if (key === Qt.Key_Up) { if (key === Qt.Key_Up) {
...@@ -273,8 +272,7 @@ function processKeyPress(event) ...@@ -273,8 +272,7 @@ function processKeyPress(event)
items.rocket.rotation -= 10; items.rocket.rotation -= 10;
//console.log("XXX rotation=" + items.rocket.rotation + " bodyRot=" + items.rocket.body.rotation); //console.log("XXX rotation=" + items.rocket.rotation + " bodyRot=" + items.rocket.body.rotation);
} }
} else }
event.accepted = false;
} }
function processKeyRelease(event) function processKeyRelease(event)
......
...@@ -192,11 +192,13 @@ Window { ...@@ -192,11 +192,13 @@ Window {
} }
}); });
} }
else else {
checkWordset() checkWordset()
}
} }
else else {
checkWordset() checkWordset()
}
if(changelog.isNewerVersion(ApplicationSettings.lastGCVersionRan, ApplicationInfo.GCVersionCode)) { if(changelog.isNewerVersion(ApplicationSettings.lastGCVersionRan, ApplicationInfo.GCVersionCode)) {
// display log between ApplicationSettings.lastGCVersionRan and ApplicationInfo.GCVersionCode // display log between ApplicationSettings.lastGCVersionRan and ApplicationInfo.GCVersionCode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment