mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 04:03:57 +00:00
Fix Node.js analyzer
This commit is contained in:
@@ -144,6 +144,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Emscripten")
|
||||
endif()
|
||||
|
||||
if(MOMO_EMSCRIPTEN_SUPPORT_NODEJS)
|
||||
add_compile_definitions(
|
||||
MOMO_EMSCRIPTEN_SUPPORT_NODEJS=1
|
||||
)
|
||||
|
||||
add_link_options(
|
||||
-lnodefs.js -sNODERAWFS=1
|
||||
-sENVIRONMENT=node
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "windows_emulator.hpp"
|
||||
#include <utils/lazy_object.hpp>
|
||||
|
||||
#ifdef OS_EMSCRIPTEN
|
||||
#if defined(OS_EMSCRIPTEN) && !defined(MOMO_EMSCRIPTEN_SUPPORT_NODEJS)
|
||||
#include <event_handler.hpp>
|
||||
#endif
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace
|
||||
auto& win_emu = *c.win_emu;
|
||||
update_import_access(c, address);
|
||||
|
||||
#ifdef OS_EMSCRIPTEN
|
||||
#if defined(OS_EMSCRIPTEN) && !defined(MOMO_EMSCRIPTEN_SUPPORT_NODEJS)
|
||||
if ((win_emu.get_executed_instructions() % 0x20000) == 0)
|
||||
{
|
||||
debugger::event_context ec{.win_emu = win_emu};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <utils/finally.hpp>
|
||||
#include <utils/interupt_handler.hpp>
|
||||
|
||||
#ifdef OS_EMSCRIPTEN
|
||||
#if defined(OS_EMSCRIPTEN) && !defined(MOMO_EMSCRIPTEN_SUPPORT_NODEJS)
|
||||
#include <event_handler.hpp>
|
||||
#endif
|
||||
|
||||
@@ -275,7 +275,7 @@ namespace
|
||||
}};
|
||||
|
||||
std::optional<NTSTATUS> exit_status{};
|
||||
#ifdef OS_EMSCRIPTEN
|
||||
#if defined(OS_EMSCRIPTEN) && !defined(MOMO_EMSCRIPTEN_SUPPORT_NODEJS)
|
||||
const auto _1 = utils::finally([&] {
|
||||
debugger::handle_exit(win_emu, exit_status); //
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace
|
||||
#ifdef _WIN32
|
||||
#define COLOR(win, posix, web) win
|
||||
using color_type = WORD;
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#elif defined(__EMSCRIPTEN__) && !defined(MOMO_EMSCRIPTEN_SUPPORT_NODEJS)
|
||||
#define COLOR(win, posix, web) web
|
||||
using color_type = const char*;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user