mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
always save after receiving messages that may have changed state.
Previously did so only when in background, but that leaves a problem: if device A sends messages to B and B ACKs them so that they're deleted but exits without saving (for any reason) the game is permanently horked. It's safer to save immediately.
This commit is contained in:
parent
f382f17d20
commit
66bc435f28
1 changed files with 1 additions and 3 deletions
|
@ -97,7 +97,6 @@ public class JNIThread extends Thread {
|
|||
private static final int kMinDivWidth = 10;
|
||||
private Rect m_connsIconRect;
|
||||
private int m_connsIconID = 0;
|
||||
private boolean m_inBack = false;
|
||||
|
||||
LinkedBlockingQueue<QueueElem> m_queue;
|
||||
|
||||
|
@ -149,7 +148,6 @@ public class JNIThread extends Thread {
|
|||
|
||||
public void setInBackground( boolean inBack )
|
||||
{
|
||||
m_inBack = inBack;
|
||||
if ( inBack ) {
|
||||
handle( JNICmd.CMD_SAVE );
|
||||
}
|
||||
|
@ -308,7 +306,7 @@ public class JNIThread extends Thread {
|
|||
draw = XwJNI.game_receiveMessage( m_jniGamePtr,
|
||||
(byte[])args[0] );
|
||||
handle( JNICmd.CMD_DO );
|
||||
if ( m_inBack ) {
|
||||
if ( draw ) {
|
||||
handle( JNICmd.CMD_SAVE );
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue