fix: Reloading ImHex not working in the web version

This commit is contained in:
WerWolv
2023-10-04 21:45:43 +02:00
parent eb41622a38
commit 1c88c3a8bd
2 changed files with 7 additions and 14 deletions

View File

@@ -113,6 +113,7 @@ namespace {
#if defined(OS_WEB)
using namespace hex::init;
void saveFsData() {
@@ -137,6 +138,12 @@ namespace {
splashWindow->startStartupTasks();
EventManager::subscribe<RequestRestartImHex>([&] {
MAIN_THREAD_EM_ASM({
location.reload();
});
});
// Draw the splash window while tasks are running
emscripten_set_main_loop_arg([](void *arg) {
auto splashWindow = reinterpret_cast<WindowSplash*>(arg);