Fix pause during network play

This commit is contained in:
simon.kagstrom 2010-03-13 14:06:08 +00:00
parent b5fad7ebda
commit e1294b9c88
3 changed files with 33 additions and 20 deletions

View File

@ -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"

View File

@ -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()
{

View File

@ -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