mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-17 03:47:03 +02:00
force running services on host
This commit is contained in:
parent
2a85f604bf
commit
3654d7b29d
2 changed files with 16 additions and 4 deletions
|
|
@ -30,6 +30,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
set(CMAKE_SIZEOF_VOID_P 8)
|
set(CMAKE_SIZEOF_VOID_P 8)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
NPROC=$(nproc || 1)
|
||||||
|
|
||||||
# Normally a platform has a package manager
|
# Normally a platform has a package manager
|
||||||
# PS4 does not, atleast not in the normal sense
|
# PS4 does not, atleast not in the normal sense
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
||||||
|
|
@ -51,4 +53,4 @@ cmake -S . -B build -G "Unix Makefiles" \
|
||||||
-DYUZU_USE_EXTERNAL_FFMPEG=ON \
|
-DYUZU_USE_EXTERNAL_FFMPEG=ON \
|
||||||
-DYUZU_USE_CPM=ON \
|
-DYUZU_USE_CPM=ON \
|
||||||
"${EXTRA_CMAKE_FLAGS[@]}" || exit
|
"${EXTRA_CMAKE_FLAGS[@]}" || exit
|
||||||
cmake --build build -t yuzu-cmd_pkg -- -j8
|
cmake --build build -t yuzu-cmd_pkg -- -j$NPROC
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,13 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system
|
||||||
|
|
||||||
system.GetFileSystemController().CreateFactories(*system.GetFilesystem(), false);
|
system.GetFileSystemController().CreateFactories(*system.GetFilesystem(), false);
|
||||||
|
|
||||||
|
#ifdef __OPENORBIS__
|
||||||
|
// PS4 requires us to run this on a single thread so we don't immediately die
|
||||||
|
bool const run_on_host = false;
|
||||||
|
#else
|
||||||
|
bool const run_on_host = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Just a quick C++ lesson
|
// Just a quick C++ lesson
|
||||||
// Capturing lambdas will silently create new variables for the objects referenced via <ident> = <expr>
|
// Capturing lambdas will silently create new variables for the objects referenced via <ident> = <expr>
|
||||||
// and create a `auto&` sorts of for `&`; with all your usual reference shenanigans.
|
// and create a `auto&` sorts of for `&`; with all your usual reference shenanigans.
|
||||||
|
|
@ -92,9 +99,12 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system
|
||||||
{"Loader", &LDR::LoopProcess},
|
{"Loader", &LDR::LoopProcess},
|
||||||
{"nvservices", &Nvidia::LoopProcess},
|
{"nvservices", &Nvidia::LoopProcess},
|
||||||
{"bsdsocket", &Sockets::LoopProcess},
|
{"bsdsocket", &Sockets::LoopProcess},
|
||||||
})
|
}) {
|
||||||
kernel.RunOnHostCoreProcess(std::string(e.first), [&system, f = e.second] { f(system); }).detach();
|
if (run_on_host) kernel.RunOnHostCoreProcess("vi", [&, token] { VI::LoopProcess(system, token); }).detach();
|
||||||
kernel.RunOnHostCoreProcess("vi", [&, token] { VI::LoopProcess(system, token); }).detach();
|
else kernel.RunOnGuestCoreProcess(std::string(e.first), [&system, f = e.second] { f(system); });
|
||||||
|
}
|
||||||
|
if (run_on_host) kernel.RunOnHostCoreProcess("vi", [&, token] { VI::LoopProcess(system, token); }).detach();
|
||||||
|
else kernel.RunOnGuestCoreProcess("vi", [&, token] { VI::LoopProcess(system, token); });
|
||||||
// Avoid cold clones of lambdas -- succintly
|
// Avoid cold clones of lambdas -- succintly
|
||||||
for (auto const& e : std::vector<std::pair<std::string_view, void (*)(Core::System&)>>{
|
for (auto const& e : std::vector<std::pair<std::string_view, void (*)(Core::System&)>>{
|
||||||
{"sm", &SM::LoopProcess},
|
{"sm", &SM::LoopProcess},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue