Skip to content

Commit fdde248

Browse files
authored
fix Ingredient session (#621)
1 parent 325c4a1 commit fdde248

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SerialPrograms/Source/PokemonSV/Programs/Sandwiches/PokemonSV_IngredientSession.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ std::string IngredientSession::move_to_ingredient(const std::set<std::string>& i
212212
size_t not_found_count = 0;
213213
while (true){
214214
m_context.wait_for_all_requests();
215+
m_context.wait_for(std::chrono::milliseconds(180));
215216
PageIngredients page = read_current_page();
216217
std::string found_ingredient;
217218
if (run_move_iteration(found_ingredient, ingredients, page)){
@@ -231,6 +232,7 @@ std::string IngredientSession::move_to_ingredient(const std::set<std::string>& i
231232
}else{
232233
m_stream.log("End of page reached without finding ingredient. Wrapping back to beginning.", COLOR_ORANGE);
233234
pbf_press_dpad(m_context, DPAD_DOWN, 20, 105);
235+
continue;
234236
}
235237
}
236238

@@ -244,8 +246,6 @@ std::string IngredientSession::move_to_ingredient(const std::set<std::string>& i
244246
// current++;
245247
// }
246248

247-
m_context.wait_for_all_requests();
248-
m_context.wait_for(std::chrono::milliseconds(180));
249249
}
250250
return "";
251251
}

0 commit comments

Comments
 (0)