mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-05 19:51:45 +00:00
Stratosphere: Fix removed add() in Launch Queue
This commit is contained in:
parent
033cd8df24
commit
21fa9ff17c
1 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,19 @@
|
||||||
namespace LaunchQueue {
|
namespace LaunchQueue {
|
||||||
static LaunchItem g_launch_queue[LAUNCH_QUEUE_SIZE];
|
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) {
|
int get_index(u64 tid) {
|
||||||
for(unsigned int i = 0; i < LAUNCH_QUEUE_SIZE; i++) {
|
for(unsigned int i = 0; i < LAUNCH_QUEUE_SIZE; i++) {
|
||||||
if(g_launch_queue[i].tid == tid) {
|
if(g_launch_queue[i].tid == tid) {
|
||||||
|
|
Loading…
Reference in a new issue