diff options
| author | Mako <137927095+Takoroka@users.noreply.github.com> | 2026-11-02 19:48:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-02 19:48:22 -0500 |
| commit | 28051fc764f6d2a6f9c64f8166c02dd2d13d77e7 (patch) | |
| tree | 3aa8c43b64f68d23d3c24b00e0e1498bc4b4c4a1 /src/yuzu_cmd | |
| parent | bd12e7c4ef7ddfcc56d88ee71612a671f582e47b (diff) | |
| parent | d8d16713b891245fd786b27d375f68d695c76d0e (diff) | |
Merge pull request #313 from cira0100/ldn/room-handshake
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index bc4002d8af..6342c5d353 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -249,6 +249,7 @@ struct SdlState { // Must outlive emu_window, which keeps a pointer to it. InputCommon::InputSubsystem input_subsystem{}; std::unique_ptr<EmuWindow_SDL3> emu_window; + bool network_initialized{}; }; static std::atomic_bool pack_nup_cancel{false}; @@ -353,6 +354,12 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) { return SDL_APP_FAILURE; } + state->network_initialized = Network::Init(); + if (!state->network_initialized) { + LOG_CRITICAL(Network, "Failed to initialize room networking"); + return SDL_APP_FAILURE; + } + state->system.Initialize(); @@ -555,7 +562,11 @@ extern "C" void SDL_AppQuit(void *appstate, SDL_AppResult result) { void(state->system.Pause()); state->system.ShutdownMainProcess(); } + const bool network_initialized = state->network_initialized; delete state; + if (network_initialized) { + Network::Shutdown(); + } } #define VMA_IMPLEMENTATION |
