impr: Handle crashes that may happen before the main loop (#1115)

Draft because I absolutely do not trust myself writing good code at 2AM.
I will review it tomorrow
This commit is contained in:
iTrooz
2023-06-01 18:35:41 +02:00
committed by GitHub
parent 9dafdeb70a
commit 117832e007
7 changed files with 185 additions and 113 deletions

View File

@@ -3,9 +3,11 @@
#include <hex/helpers/logger.hpp>
#include "window.hpp"
#include "crash_handlers.hpp"
#include "init/splash_window.hpp"
#include "init/tasks.hpp"
#include "init/tasks.hpp"
#include <hex/api/task.hpp>
#include <hex/api/project_file_manager.hpp>
@@ -15,6 +17,7 @@
int main(int argc, char **argv, char **envp) {
using namespace hex;
hex::crash::setupCrashHandlers();
ImHexApi::System::impl::setProgramArguments(argc, argv, envp);
// Check if ImHex is installed in portable mode
@@ -79,6 +82,8 @@ int main(int argc, char **argv, char **envp) {
}
// Render the main window
EventManager::post<EventImHexStartupFinished>();
window.loop();
}