Files
tp/include/JSystem/JAudio2/JASGadget.h
T
hatal175 f17cf7f6f1 JASSeqCtrl OK + misc functions (#346)
* JASSeqCtrl OK + misc functions

* Work on JASAudioThread
2023-06-09 01:55:15 -07:00

29 lines
478 B
C++

#ifndef JASGADGET_H
#define JASGADGET_H
#include "dolphin/types.h"
template<class T>
class JASGlobalInstance {
public:
JASGlobalInstance(T* inst) {
sInstance = inst;
}
JASGlobalInstance(bool param_1) {
sInstance = (T*)this;
}
~JASGlobalInstance() {
if (sInstance == (T*)this) {
sInstance = NULL;
}
}
static T* getInstance() { return sInstance; }
static T* sInstance;
};
#endif /* JASGADGET_H */