DroidFish: Updated for new SDK/NDK versions.

This commit is contained in:
Peter Osterlund 2012-05-01 16:53:19 +00:00
parent d349d41e26
commit 00013ebaa9
4 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry combineaccessrules="false" kind="src" path="/CuckooChessEngine"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/CuckooChessEngine"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@ -11,8 +11,7 @@
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="10"/>
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:debuggable="false">
android:label="@string/app_name">
<activity android:name=".DroidFish"
android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden">

View File

@ -142,6 +142,7 @@ public class DroidFish extends Activity implements GUIInterface {
// FIXME!!! Better behavior if engine is terminated. How exactly?
// FIXME!!! Handle PGN intents with more than one game.
// FIXME!!! File load/save of FEN data
// FIXME!!! Make engine hash size configurable.
private ChessBoard cb;

View File

@ -84,6 +84,8 @@ final class InternalBook implements IOpeningBook {
numBookMoves = 0;
try {
InputStream inStream = getClass().getResourceAsStream("/book.bin");
if (inStream == null)
throw new IOException();
List<Byte> buf = new ArrayList<Byte>(8192);
byte[] tmpBuf = new byte[1024];
while (true) {