2
0
Fork 0

Test inter-instance communication via static variables.

This commit is contained in:
bruce 2014-11-11 21:15:43 +09:00
parent 76206997f8
commit 9a88c7d32d
2 changed files with 6 additions and 0 deletions

View File

@ -6,12 +6,17 @@
// A wrapper around the DOSBox and ZDoom OPL emulators.
// Used by the first recording instance to claim master status
// TODO: develop the logic for recording data from other (non-master) plugins
Hiopl* Hiopl::master = NULL;
bool Hiopl::IsAnInstanceRecording() {
return NULL != Hiopl::master;
}
bool Hiopl::IsAnotherInstanceRecording() {
return this->IsAnInstanceRecording() && this != Hiopl::master;
}
Hiopl::Hiopl(int buflen, Emulator emulator) {
InitCaptureVariables();

View File

@ -60,6 +60,7 @@ class Hiopl {
void InitCaptureVariables();
bool IsAnInstanceRecording();
bool IsAnotherInstanceRecording();
void StartCapture(const char* filepath);
void StopCapture();