Fixes for emscripten

This commit is contained in:
momo5502
2025-04-17 18:57:17 +02:00
parent cd348e0095
commit c1553ad2ec
10 changed files with 152 additions and 28 deletions

View File

@@ -3,9 +3,7 @@
#include "cpu_context.hpp"
#ifndef OS_EMSCRIPTEN
#include <unicorn_x64_emulator.hpp>
#endif
#if MOMO_ENABLE_RUST_CODE
#include <icicle_x64_emulator.hpp>
@@ -265,10 +263,6 @@ namespace
std::unique_ptr<x64_emulator> create_default_x64_emulator()
{
#ifdef OS_EMSCRIPTEN
return icicle::create_x64_emulator();
#else
#if MOMO_ENABLE_RUST_CODE
const auto* env = getenv("EMULATOR_ICICLE");
if (env && (env == "1"sv || env == "true"sv))
@@ -276,8 +270,8 @@ std::unique_ptr<x64_emulator> create_default_x64_emulator()
return icicle::create_x64_emulator();
}
#endif
return unicorn::create_x64_emulator();
#endif
}
windows_emulator::windows_emulator(application_settings app_settings, const emulator_settings& settings,