mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-02-06 20:29:10 +01:00
DroidFish: In computeNetEngineID(), don't read the whole engine file when the engine is not a network engine.
This commit is contained in:
parent
234e15dd98
commit
d5a640440b
|
@ -1224,9 +1224,11 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||
String id = "";
|
||||
try {
|
||||
String engine = settings.getString("engine", "stockfish");
|
||||
String[] lines = Util.readFile(engine);
|
||||
if (lines.length >= 3)
|
||||
id = lines[1] + ":" + lines[2];
|
||||
if (EngineUtil.isNetEngine(engine)) {
|
||||
String[] lines = Util.readFile(engine);
|
||||
if (lines.length >= 3)
|
||||
id = lines[1] + ":" + lines[2];
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
engineOptions.networkID = id;
|
||||
|
|
Loading…
Reference in New Issue
Block a user