Skip to content

Commit 78819c4

Browse files
committed
Don't send error report if ball sprite hasn't loaded.
1 parent 7393232 commit 78819c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SerialPrograms/Source/PokemonSwSh/Inference/Battles/PokemonSwSh_BattleBallReader.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ std::string BattleBallReader::read_ball(const ImageViewRGB32& screen) const{
6363
}
6464
}
6565
if (sprite_result.results.empty()){
66-
dump_image(m_console, ProgramInfo(), "BattleBallReader-Sprite", screen);
66+
ImageViewRGB32 sprite = extract_box_reference(screen, m_box_sprite);
67+
ImageStats stats = image_stats(sprite);
68+
if (stats.stddev.sum() > 20){
69+
dump_image(m_console, ProgramInfo(), "BattleBallReader-Sprite", screen);
70+
}
6771
}
6872

6973
OCR::StringMatchResult name_result;

0 commit comments

Comments
 (0)