Permalink
Browse files

Emergency fix for Android LoadState

  • Loading branch information...
1 parent 6958c75 commit 953ee7b913242732f3d91bf2f6598e3a6f0ca120 blitz-research committed Apr 4, 2013
View
@@ -3,7 +3,9 @@ NOTE: If you're having trouble with a new version, try deleting '.build' dirs!!!
***** v70b *****
-Android LoadState now checks for pre v67 state if v67 state not found - my bad, I renamed the state 'key' in v67...
+Added temp LoadState_V66b() to Android target for kludging around LoadState issues. If you have recently updated a <v67 app to >=v67, and users have mysteriously 'lost' their save games, you can use this to recover their old save games. However, you might want to let user decide whether to use 'old' or 'new' save game.
+
+Android LoadState now checks for <v67 state data if >=v67 state data not found - my bad, I renamed the state 'key' in v67.
***** V70 *****
@@ -13,7 +13,7 @@ Class MyApp Extends App
Method OnCreate()
- Local state$=LoadState()
+ Local state$=LoadState_V66b()
If state
creates=Int( state )+1
Else
@@ -109,7 +109,7 @@ Class Markdown
Local i1:=i0+l
While i1<src.Length
Local c:=src[i1]
- If (c=95) Or (c>=65 And c<=90) Or (c>=97 And c<=122) Or (i1>i0+l And c>=48 And c<=57)
+ If (c=95) Or (c>=65 And c<=90) Or (c>=97 And c<=122) Or (i1>i0+l And c>=48 And c<=57)
i1+=1
Continue
Endif
@@ -6,3 +6,6 @@ Import brl.gametarget
Import "native/androidgame.java"
Import "native/monkeytarget.java"
+Extern
+
+Function LoadState_V66b:String()="BBAndroidGame.LoadState_V66b"
@@ -388,6 +388,12 @@ public String LoadState(){
return state;
}
+ //Temporary fix!
+ static public String LoadState_V66b(){
+ SharedPreferences prefs=_androidGame._activity.getPreferences( 0 );
+ return prefs.getString( "gxtkAppState","" );
+ }
+
public boolean PollJoystick( int port,float[] joyx,float[] joyy,float[] joyz,boolean[] buttons ){
if( port!=0 ) return false;
joyx[0]=_joyx[0];joyy[0]=_joyy[0];joyz[0]=_joyz[0];

0 comments on commit 953ee7b

Please sign in to comment.