mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-05-28 17:41:37 +00:00
Fix loading from save-state (from MB playback to no card)
This commit is contained in:
parent
2f4f8ae780
commit
0606716072
|
@ -422,26 +422,6 @@ UINT MockingboardCard::MB_Update(void)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// TODO-TC: check this - but shouldn't happen now, since MockingboardCard's are now properly destructed
|
||||
//
|
||||
// NB. Mockingboard voice is *already* muted because showing 'Select Load State file' dialog
|
||||
// . and voice will be unmuted when dialog is closed
|
||||
void MockingboardCard::InitializeForLoadingSnapshot(void) // GH#609
|
||||
{
|
||||
Reset(true);
|
||||
|
||||
// if (g_bDisableDirectSound || g_bDisableDirectSoundMockingboard)
|
||||
// return;
|
||||
//
|
||||
// _ASSERT(MockingboardVoice.lpDSBvoice);
|
||||
// DSVoiceStop(&MockingboardVoice); // Reason: 'MB voice is playing' then loading a save-state where 'no MB present'
|
||||
|
||||
// NB. ssi263.Stop() already done by Reset()
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// NB. Called when /g_fCurrentCLK6502/ changes
|
||||
void MockingboardCard::ReinitializeClock(void)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ public:
|
|||
BYTE IOWriteInternal(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
|
||||
BYTE PhasorIOInternal(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, ULONG nExecutedCycles);
|
||||
|
||||
void InitializeForLoadingSnapshot(void);
|
||||
void ReinitializeClock(void);
|
||||
void MuteControl(bool mute);
|
||||
void UpdateCycles(ULONG executedCycles);
|
||||
|
|
|
@ -53,11 +53,11 @@ void MockingboardCardManager::ReinitializeClock(void)
|
|||
|
||||
void MockingboardCardManager::InitializeForLoadingSnapshot(void)
|
||||
{
|
||||
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
|
||||
{
|
||||
if (IsMockingboard(i))
|
||||
dynamic_cast<MockingboardCard&>(GetCardMgr().GetRef(i)).InitializeForLoadingSnapshot();
|
||||
}
|
||||
if (g_bDisableDirectSound || g_bDisableDirectSoundMockingboard)
|
||||
return;
|
||||
|
||||
if (MockingboardVoice.lpDSBvoice);
|
||||
DSVoiceStop(&MockingboardVoice); // Reason: 'MB voice is playing' then loading a save-state where 'no MB present' (GH#609)
|
||||
}
|
||||
|
||||
void MockingboardCardManager::MuteControl(bool mute)
|
||||
|
|
Loading…
Reference in New Issue
Block a user