diff --git a/ChangeLog b/ChangeLog
index 864483f..40433ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
Version 0.0.2: name changed to spOSMroute, since on there had been another
OSMroute already.
=============================================================================
+(2014-01-20):
+- fixed: disabled screensaver on Android
+
(2013-08-28):
- fixed: some search messages created a crash on 32bit systems.
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 8a54e42..e0f39b7 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -30,6 +30,6 @@
-
+
diff --git a/android/src/de/gulpe/sposmroute/spOSMrNActivity.java b/android/src/de/gulpe/sposmroute/spOSMrNActivity.java
index 08b9b52..e3a6425 100644
--- a/android/src/de/gulpe/sposmroute/spOSMrNActivity.java
+++ b/android/src/de/gulpe/sposmroute/spOSMrNActivity.java
@@ -8,6 +8,8 @@ import android.os.Bundle;
import android.util.Log;
import android.content.Context;
import android.location.GpsStatus.NmeaListener;
+import android.view.WindowManager;
+import android.view.ViewGroup.LayoutParams;
public class spOSMrNActivity extends NativeActivity {
private static final String TAG = "spOSMroute Java";
@@ -19,6 +21,7 @@ public class spOSMrNActivity extends NativeActivity {
private LocationListener mLocListener;
public void onCreate(Bundle savedInstanceState) {
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mLocMan = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
mLocListener = new MyLocationListener();
mLocMan.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocListener);
@@ -76,6 +79,7 @@ public class spOSMrNActivity extends NativeActivity {
// Do some cleanup
@Override
public void onDestroy() {
+ getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
super.onDestroy();
}
}
diff --git a/draw/draw_gui.c b/draw/draw_gui.c
index 27500f6..30a4e3e 100644
--- a/draw/draw_gui.c
+++ b/draw/draw_gui.c
@@ -58,7 +58,7 @@ void draw_mousemove (int x, int y, int btn) {
mousepos.y = y;
if (mousebtn) {
latold = -map_km2lat(((float)(mousebtnpresspos.y-gfx_screensize.y/2)) * view_scale);
- lonold = map_km2lon(((float)(mousebtnpresspos.x-gfx_screensize.x/2)) * view_scale, view_lat + lat);
+ lonold = map_km2lon(((float)(mousebtnpresspos.x-gfx_screensize.x/2)) * view_scale, view_lat + latold);
lat = -map_km2lat(((float)(y-gfx_screensize.y/2)) * view_scale);
lon = map_km2lon(((float)(x-gfx_screensize.x/2)) * view_scale, view_lat + lat);