Skip to content

Commit 75be407

Browse files
committed
Minor
1 parent b4911d9 commit 75be407

2 files changed

Lines changed: 14 additions & 16 deletions

File tree

SerialPrograms/Source/CommonFramework/Main.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,18 @@ int main(int argc, char *argv[]){
234234
global_watchdog().stop();
235235
static_cast<FileWindowLogger&>(global_logger_raw()).stop();
236236

237+
//
238+
// Workaround Qt 6.9 thread-adoption bug on Windows.
239+
// https://github.com/PokemonAutomation/Arduino-Source/issues/570
240+
// https://bugreports.qt.io/browse/QTBUG-131892
241+
//
242+
// Joining threads on Qt 6.9+ Windows will hang!
243+
//
244+
#ifdef PA_ENABLE_QT_ADOPTION_WORKAROUND
245+
cout << "Qt6.9 bug workaround: std::quick_exit() to avoid thread join hangs." << endl;
246+
std::quick_exit(ret);
247+
#endif
248+
237249
// Force stop the thread pools.
238250
// This is where all the threads in the program are joined.
239251
PokemonAutomation::GlobalThreadPools::computation_realtime().stop();
@@ -247,17 +259,5 @@ int main(int argc, char *argv[]){
247259

248260
cout << "Exiting main()..." << endl;
249261

250-
//
251-
// Workaround Qt 6.9 thread-adoption bug on Windows.
252-
// https://github.com/PokemonAutomation/Arduino-Source/issues/570
253-
// https://bugreports.qt.io/browse/QTBUG-131892
254-
//
255-
// Joining threads on Qt 6.9+ Windows will hang!
256-
//
257-
#ifdef PA_ENABLE_QT_ADOPTION_WORKAROUND
258-
cout << "Qt6.9 bug workaround: std::quick_exit() to avoid thread join hangs." << endl;
259-
std::quick_exit(ret);
260-
#endif
261-
262262
return ret;
263263
}

SerialPrograms/Source/PokemonFRLG/PokemonFRLG_Panels.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
3535
//ret.emplace_back("---- General ----");
3636

3737
ret.emplace_back("---- Shiny Hunting ----");
38-
if (IS_BETA_VERSION){
39-
ret.emplace_back(make_single_switch_program<GiftReset_Descriptor, GiftReset>());
40-
ret.emplace_back(make_single_switch_program<LegendaryReset_Descriptor, LegendaryReset>());
41-
}
38+
ret.emplace_back(make_single_switch_program<GiftReset_Descriptor, GiftReset>());
39+
ret.emplace_back(make_single_switch_program<LegendaryReset_Descriptor, LegendaryReset>());
4240
if (PreloadSettings::instance().DEVELOPER_MODE){
4341
ret.emplace_back(make_single_switch_program<LegendaryRunAway_Descriptor, LegendaryRunAway>());
4442
ret.emplace_back(make_single_switch_program<PrizeCornerReset_Descriptor, PrizeCornerReset>());

0 commit comments

Comments
 (0)