diff --git a/Src/C64.cpp b/Src/C64.cpp index f679581..a7a464b 100644 --- a/Src/C64.cpp +++ b/Src/C64.cpp @@ -679,4 +679,29 @@ bool C64::LoadSnapshot(const char *filename) } } +void C64::Pause(void) +{ + /* No pause when the network is running */ + if (this->network) + { + this->have_a_break = false; + return; + } + + this->have_a_break = true; + TheSID->PauseSound(); +} + +bool C64::IsPaused() +{ + return this->have_a_break; +} + + +void C64::Resume(void) +{ + this->have_a_break = false; + TheSID->ResumeSound(); +} + #include "C64_SDL.h" diff --git a/Src/C64.h b/Src/C64.h index ff0b89e..42640d5 100644 --- a/Src/C64.h +++ b/Src/C64.h @@ -65,15 +65,9 @@ public: void Run(void); void Quit(void); - void Pause(void) - { - this->have_a_break = true; - } + void Pause(void); - void Resume(void) - { - this->have_a_break = false; - } + void Resume(void); void Reset(void); void NMI(void); @@ -116,18 +110,7 @@ public: #ifdef FRODO_SC uint32 CycleCounter; #endif - bool IsPaused() - { - return this->have_a_break; - } - - void enter_menu() { - this->have_a_break = true; - } - - bool is_in_menu() { - return this->have_a_break; - } + bool IsPaused(); void quit() { diff --git a/Src/gui/main_menu.cpp b/Src/gui/main_menu.cpp index aa50fca..b8446e3 100644 --- a/Src/gui/main_menu.cpp +++ b/Src/gui/main_menu.cpp @@ -70,6 +70,11 @@ public: { case 0: TheC64->IsPaused() ? TheC64->Resume() : TheC64->Pause(); + if (TheC64->network) + { + Gui::gui->status_bar->queueMessage("Can't pause when in network mode"); + break; + } if (TheC64->IsPaused()) Gui::gui->status_bar->queueMessage("C64 emulation paused"); else