}
+//
+// Pause/unpause the SDL audio thread
+//
+void DACPauseAudioThread(bool state/*= true*/)
+{
+ SDL_PauseAudio(state);
+}
+
+
//
// Close down the SDL sound subsystem
//
{
//WriteLog("asked to perform a single step (single step is %senabled)\n",(data&0x8)?"":"not ");
}
+
gpu_control = (gpu_control & 0xF7C0) | (data & (~0xF7C0));
// if gpu wasn't running but is now running, execute a few cycles
// Some machines can't handle this, so we give them the option to disable it. :-)
if (!plzDontKillMyComputer)
{
- // Random hash & trash
- // We try to simulate an untuned tank circuit here... :-)
- for(uint32_t x=0; x<videoWidget->rasterWidth; x++)
- {
- for(uint32_t y=0; y<videoWidget->rasterHeight; y++)
+ // Random hash & trash
+ // We try to simulate an untuned tank circuit here... :-)
+ for(uint32_t x=0; x<videoWidget->rasterWidth; x++)
{
- videoWidget->buffer[(y * videoWidget->textureWidth) + x]
- = (rand() & 0xFF) << 8 | (rand() & 0xFF) << 16 | (rand() & 0xFF) << 24;
+ for(uint32_t y=0; y<videoWidget->rasterHeight; y++)
+ {
+ videoWidget->buffer[(y * videoWidget->textureWidth) + x]
+ = (rand() & 0xFF) << 8 | (rand() & 0xFF) << 16 | (rand() & 0xFF) << 24;
+ }
}
}
- }
}
else
{
showUntunedTankCircuit = true;
// This is just in case the ROM we were playing was in a narrow or wide field mode,
// so the untuned tank sim doesn't look wrong. :-)
+ DACPauseAudioThread();
TOMReset();
}
else
WriteLog("GUI: Resetting Jaguar...\n");
JaguarReset();
+ DACPauseAudioThread(false);
}
}
videoWidget->updateGL();
}
+
+ // Pause/unpause any running/non-running threads...
+ DACPauseAudioThread(!running);
}