cleanup: use new board_drawSnapshot on existing game

This commit is contained in:
Eric House 2016-08-05 22:04:30 -07:00
parent bf7a38da08
commit b9bb1e2684
2 changed files with 3 additions and 16 deletions

View file

@ -351,21 +351,6 @@ public class GameUtils {
return thumb; return thumb;
} }
public static Bitmap loadMakeBitmap( Context context, byte[] stream,
GameLock lock )
{
Bitmap thumb = null;
CurGameInfo gi = new CurGameInfo( context );
GamePtr gamePtr = loadMakeGame( context, gi, null, null, stream,
lock.getRowid() );
if ( null != gamePtr ) {
thumb = takeSnapshot( context, gamePtr, gi );
gamePtr.release();
DBUtils.saveThumbnail( context, lock, thumb );
}
return thumb;
}
public static Bitmap takeSnapshot( Context context, GamePtr gamePtr, public static Bitmap takeSnapshot( Context context, GamePtr gamePtr,
CurGameInfo gi ) CurGameInfo gi )
{ {

View file

@ -375,7 +375,9 @@ public class JNIThread extends Thread {
XwJNI.game_saveSucceeded( m_jniGamePtr ); XwJNI.game_saveSucceeded( m_jniGamePtr );
m_lastSavedState = newHash; m_lastSavedState = newHash;
GameUtils.loadMakeBitmap( m_context, state, m_lock ); Bitmap thumb
= GameUtils.takeSnapshot( m_context, m_jniGamePtr, m_gi );
DBUtils.saveThumbnail( m_context, m_lock, thumb );
} }
} }
} }