mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-04 01:07:56 -04:00
Reorganize library code into libs/ (#3119)
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// JASCmdStack
|
||||
//
|
||||
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JAudio2/JASCmdStack.h"
|
||||
#include "JSystem/JAudio2/JASCriticalSection.h"
|
||||
#include <os.h>
|
||||
|
||||
JASPortCmd::TPortHead JASPortCmd::sCommandListOnce;
|
||||
|
||||
JASPortCmd::TPortHead JASPortCmd::sCommandListStay;
|
||||
|
||||
bool JASPortCmd::addPortCmdOnce() {
|
||||
JASCriticalSection cs;
|
||||
return sCommandListOnce.append(this);
|
||||
}
|
||||
|
||||
bool JASPortCmd::setPortCmd(Command func, JASPortArgs* args) {
|
||||
JUT_ASSERT(81, func != NULL);
|
||||
if (getSupervisor()) {
|
||||
return false;
|
||||
}
|
||||
mFunc = func;
|
||||
mArgs = args;
|
||||
return true;
|
||||
}
|
||||
|
||||
void JASPortCmd::execAllCommand() {
|
||||
sCommandListOnce.execCommandOnce();
|
||||
sCommandListStay.execCommandStay();
|
||||
}
|
||||
|
||||
void JASPortCmd::TPortHead::execCommandOnce() {
|
||||
JASCriticalSection cs;
|
||||
JSULink<JASPortCmd>* next;
|
||||
for (JSULink<JASPortCmd>* link = getFirst(); link != NULL; link = next) {
|
||||
next = link->getNext();
|
||||
JASPortCmd* cmd = link->getObject();
|
||||
cmd->getFunc()(cmd->getArgs());
|
||||
remove(link);
|
||||
}
|
||||
}
|
||||
|
||||
void JASPortCmd::TPortHead::execCommandStay() {
|
||||
JASCriticalSection cs;
|
||||
for (JSULink<JASPortCmd>* link = getFirst(); link != NULL; link = link->getNext()) {
|
||||
JASPortCmd* cmd = link->getObject();
|
||||
cmd->getFunc()(cmd->getArgs());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user