diff --git a/docs/user/CommandLine.md b/docs/user/CommandLine.md index ae8dc0cd85..51542115e3 100644 --- a/docs/user/CommandLine.md +++ b/docs/user/CommandLine.md @@ -28,4 +28,5 @@ There are two main applications, an SDL-based app (`eden-cli`) and a Qt based ap - `--version/-v`: Display version and quit. - `--input-profile/-i`: Specifies input profile name to use (for player #0 only). - `--null-render/-n`: Forces the usage of the "Null" render backend irrespective of settings. -- `--filter/-F`: Sets the debug log filter irrespective of settings. +- `--filter/-x`: Sets the debug log filter irrespective of settings. +- `--singlecore/-s`: Forces single-core regardless of settings. diff --git a/src/core/hle/service/services.cpp b/src/core/hle/service/services.cpp index 368b5193f9..464c4397ad 100644 --- a/src/core/hle/service/services.cpp +++ b/src/core/hle/service/services.cpp @@ -86,7 +86,7 @@ Services::Services(std::shared_ptr& sm, Core::System& system // BEGONE cold clones of lambdas, for I have merged you all into a SINGLE lambda instead of // spamming lambdas like it's some kind of lambda calculus class - for (auto const& e : std::vector>{ + std::vector> rt_services{ {"audio", &Audio::LoopProcess}, {"FS", &FileSystem::LoopProcess}, // Must match with src/core/CMakeLists.txt for target_source of jit.cpp @@ -97,9 +97,16 @@ Services::Services(std::shared_ptr& sm, Core::System& system {"Loader", &LDR::LoopProcess}, {"nvservices", &Nvidia::LoopProcess}, {"bsdsocket", &Sockets::LoopProcess}, - }) + }; +#if defined(__EMSCRIPTEN__) || defined(__wasi__) || defined(__OPENORBIS__) + for (auto const& e : rt_services) + kernel.RunOnGuestCoreProcess(std::string(e.first), [&system, f = e.second] { f(system); }); + kernel.RunOnGuestCoreProcess("vi", [&, token] { VI::LoopProcess(system, token); }); +#else + for (auto const& e : rt_services) kernel.RunOnHostCoreProcess(std::string(e.first), [&system, f = e.second] { f(system); }).detach(); - kernel.RunOnHostCoreProcess("vi", [&, token] { VI::LoopProcess(system, token); }).detach(); + kernel.RunOnHostCoreProcess("vi", [&, token] { VI::LoopProcess(system, token); }).detach(); +#endif // Avoid cold clones of lambdas -- succintly for (auto const& e : std::vector>{ {"sm", &SM::LoopProcess}, diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp index 3b8e357a5d..3a6b9866c8 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp @@ -199,7 +199,7 @@ void EmuWindow_SDL3::OnEvent(SDL_Event& event) { case SDL_EVENT_MOUSE_BUTTON_UP: // ignore if it came from touch if (event.button.which != SDL_TOUCH_MOUSEID) { - OnMouseButton(event.button.button, event.button.down ? 1 : 0, s32(event.button.x), s3>(event.button.y)); + OnMouseButton(event.button.button, event.button.down ? 1 : 0, s32(event.button.x), s32(event.button.y)); } return; case SDL_EVENT_FINGER_DOWN: diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 78b562baa3..66977f7531 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -216,6 +216,7 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) { bool use_multiplayer = false; bool fullscreen = false; bool force_null_render = false; + bool force_single_core = false; std::string nickname{}; std::string password{}; std::string address{}; @@ -236,7 +237,8 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) { {"version", no_argument, 0, 'v'}, {"input-profile", no_argument, 0, 'i'}, {"null-render", no_argument, 0, 'n'}, - {"filter", no_argument, 0, 'F'}, + {"singlecore", no_argument, 0, 's'}, + {"filter", no_argument, 0, 'x'}, {0, 0, 0, 0}, // clang-format on }; @@ -310,7 +312,10 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) { case 'n': force_null_render = true; break; - case 'F': + case 's': + force_single_core = true; + break; + case 'x': log_filter = argv[optind]; ++optind; break; @@ -351,6 +356,10 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) { Settings::values.gdbstub_port = *override_gdb_port; } + if (force_single_core) { + Settings::values.use_multi_core = false; + } + if (force_null_render) { Settings::values.renderer_backend = Settings::RendererBackend::Null; } diff --git a/tools/miniserver.js b/tools/miniserver.js index 44a7d7ca30..108b6077a5 100755 --- a/tools/miniserver.js +++ b/tools/miniserver.js @@ -5,8 +5,7 @@ import { createServer } from 'http'; import { readFile } from 'fs'; import { join } from 'path'; - -// DO NOT RUN THIS IN ANY PRODUCTION ENVIRONMENT EVER +console.log(`dont forget to run: "npm --global install @jdmichaud/dwarf-2-sourcemap" for better debugging!`); const server = createServer((req, res) => { console.log(`get ${req.url}`); if (req.url === '/') { @@ -22,15 +21,15 @@ const server = createServer((req, res) => { eden-cli - -
+ +