Skip to content

Commit

Permalink
hopefully fix macos builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Prevter committed Dec 7, 2024
1 parent 0712a77 commit 3795ba7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ wxIMPLEMENT_APP_NO_MAIN(App);
breakdown::platform::registerCrashHandler([](auto const& crashHandler) {
breakdown::g_crashHandler = const_cast<breakdown::CrashHandler*>(&crashHandler);
geode::log::error("Geometry Dash crashed! Handling crash...");
wxEntry(); // wxEntry locks the thread, so g_crashHandler will be valid until the end of the program

// wxEntry locks the thread, so g_crashHandler will be valid until the end of the program
wxEntry(
// macOS doesn't have default arguments for wxEntry somehow
GEODE_MACOS(0, nullptr)
);

breakdown::g_crashHandler = nullptr;
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace breakdown::utils {
}

inline std::string_view getWittyComment() {
return WITTY_COMMENTS[random(0ULL, WITTY_COMMENTS.size() - 1)];
return WITTY_COMMENTS[random<size_t>(0, WITTY_COMMENTS.size() - 1)];
}

std::string formatTime(std::chrono::time_point<std::chrono::system_clock> time, bool fileSafe = false);
Expand Down

0 comments on commit 3795ba7

Please sign in to comment.