fix : analyze game stuck on 1% progress

This commit is contained in:
GuillaumeSD
2025-05-16 13:24:17 +02:00
parent c35c1bf0a3
commit 653f3f1de4
5 changed files with 20 additions and 18 deletions

View File

@@ -165,7 +165,7 @@ export const useCurrentPosition = (engine: UciEngine | null) => {
return () => {
if (engine?.getIsReady()) {
engine?.stopSearch();
engine?.stopAllCurrentJobs();
}
};
// eslint-disable-next-line react-hooks/exhaustive-deps

View File

@@ -101,6 +101,10 @@ export default function AnalyzeButton() {
black.rating,
]);
useEffect(() => {
setEvaluationProgress(0);
}, [engine, setEvaluationProgress]);
// Automatically analyze when a new game is loaded and ready to analyze
useEffect(() => {
if (!gameEval && readyToAnalyse) {