Stratosphere: Fix removed add() in Launch Queue

This commit is contained in:
Michael Scire 2018-04-17 18:05:19 -06:00
parent 033cd8df24
commit 21fa9ff17c

View file

@ -5,6 +5,19 @@
namespace LaunchQueue {
static LaunchItem g_launch_queue[LAUNCH_QUEUE_SIZE];
Result add(LaunchItem *item) {
if(item->arg_size > LAUNCH_QUEUE_ARG_SIZE_MAX) {
return 0x209;
}
int idx = get_free_index(item->tid);
if(idx == LAUNCH_QUEUE_FULL)
return 0x409;
g_launch_queue[idx] = *item;
return 0x0;
}
int get_index(u64 tid) {
for(unsigned int i = 0; i < LAUNCH_QUEUE_SIZE; i++) {
if(g_launch_queue[i].tid == tid) {