Test inter-instance communication via static variables.
This commit is contained in:
parent
76206997f8
commit
9a88c7d32d
2 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ class Hiopl {
|
|||
|
||||
void InitCaptureVariables();
|
||||
bool IsAnInstanceRecording();
|
||||
bool IsAnotherInstanceRecording();
|
||||
void StartCapture(const char* filepath);
|
||||
void StopCapture();
|
||||
|
||||
|
|
Loading…
Reference in a new issue