From 66cf5202e5878b02c6b4fe0795f33cd0527488d4 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sun, 26 Apr 2009 06:02:57 +0000 Subject: [PATCH] Quit back to the homebrew channel by default, but not if networking has been enabled --- CHANGES.WII | 3 +++ Src/C64_SDL.h | 2 +- Src/Network.cpp | 2 ++ Src/Network.h | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.WII b/CHANGES.WII index fb489d2..bf1b00e 100644 --- a/CHANGES.WII +++ b/CHANGES.WII @@ -10,6 +10,9 @@ TODO: Handle Run/Stop in virtual keyboard (?) version 10: + * Quit to the homebrew menu unless networking has been enabled ("hard" + quit fixes a networking issue) + * Added ability to recurse into directories (partly by Holger Eilts) * Large redesign of menu layout and colors (Holger Eilts) diff --git a/Src/C64_SDL.h b/Src/C64_SDL.h index c736b2e..31c8603 100644 --- a/Src/C64_SDL.h +++ b/Src/C64_SDL.h @@ -729,7 +729,7 @@ void C64::VBlank(bool draw_frame) this->network_vblank(); #if defined(GEKKO) - if (this->quit_thyself) + if (this->quit_thyself && Network::networking_started == true) SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); now = ticks_to_millisecs(gettime()); #else diff --git a/Src/Network.cpp b/Src/Network.cpp index 84a71c1..1eb021b 100644 --- a/Src/Network.cpp +++ b/Src/Network.cpp @@ -78,6 +78,7 @@ Network::Network(const char *remote_host, int port, bool is_master) /* Assume black screen */ memset(this->screen, 0, DISPLAY_X * DISPLAY_Y); + Network::networking_started = true; /* Peer addresses, if it fails we are out of luck */ if (this->InitSocket(remote_host, port) == false) { @@ -1256,6 +1257,7 @@ uint8 Network::sample_buf[NETWORK_SOUND_BUF_SIZE]; int Network::sample_head; int Network::sample_tail; bool Network::is_master = true; /* Assume until set false */ +bool Network::networking_started = false; #if defined(GEKKO) #include "NetworkWii.h" diff --git a/Src/Network.h b/Src/Network.h index 90173f8..d5623fd 100644 --- a/Src/Network.h +++ b/Src/Network.h @@ -364,6 +364,9 @@ protected: static uint8 sample_buf[NETWORK_SOUND_BUF_SIZE]; static int sample_head; static int sample_tail; + +public: + static bool networking_started; }; #endif /* NETWORK_H */