Files
tp/include/JSystem/JAudio2/JASGadget.h
T
TakaRikka 52d84413bb d_a_alink_swim work / fix JASGlobalInstance (#288)
* daalink / z2linkmgr wip

* first cleanup of JASGlobalInstance data

* fix sInstance stuff part 2

* more d_a_alink_swim work

* remove asm
2023-02-16 14:09:22 -07:00

25 lines
399 B
C++

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