mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-03-11 15:58:08 +01:00
DroidFish: Display an error message if an engine is terminated prematurely.
This commit is contained in:
parent
ae985c5ed5
commit
b97830c29a
@ -408,6 +408,7 @@ you are not actively using the program.\
|
||||
<string name="stockfish_engine">Stockfish</string>
|
||||
<string name="cuckoochess_engine">CuckooChess</string>
|
||||
<string name="failed_to_start_engine">Failed to start engine</string>
|
||||
<string name="engine_terminated">Engine terminated</string>
|
||||
|
||||
<string name="err_too_few_spaces">Too few spaces</string>
|
||||
<string name="err_invalid_piece">Invalid piece</string>
|
||||
|
@ -75,6 +75,9 @@ public class ExternalEngine extends UCIEngineBase {
|
||||
engineProc.waitFor();
|
||||
if (!startedOk)
|
||||
report.reportError(context.getString(R.string.failed_to_start_engine));
|
||||
else {
|
||||
report.reportError(context.getString(R.string.engine_terminated));
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
@ -184,12 +187,12 @@ public class ExternalEngine extends UCIEngineBase {
|
||||
/** @inheritDoc */
|
||||
@Override
|
||||
public void shutDown() {
|
||||
if (exitThread != null)
|
||||
exitThread.interrupt();
|
||||
super.shutDown();
|
||||
if (engineProc != null)
|
||||
engineProc.destroy();
|
||||
engineProc = null;
|
||||
if (exitThread != null)
|
||||
exitThread.interrupt();
|
||||
if (stdInThread != null)
|
||||
stdInThread.interrupt();
|
||||
if (stdErrThread != null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user