mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 22:54:24 -04:00
Stratosphere: Skeleton ldr:dmnt
This commit is contained in:
parent
21fa9ff17c
commit
c4db563261
5 changed files with 65 additions and 4 deletions
|
@ -1,11 +1,28 @@
|
|||
#include <switch.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "ldr_launch_queue.hpp"
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
namespace LaunchQueue {
|
||||
static LaunchItem g_launch_queue[LAUNCH_QUEUE_SIZE];
|
||||
|
||||
Result add(LaunchItem *item) {
|
||||
Result add(u64 tid, const char *args, u64 arg_size) {
|
||||
if(arg_size > LAUNCH_QUEUE_ARG_SIZE_MAX) {
|
||||
return 0x209;
|
||||
}
|
||||
|
||||
int idx = get_free_index(tid);
|
||||
if(idx == LAUNCH_QUEUE_FULL)
|
||||
return 0x409;
|
||||
|
||||
g_launch_queue[idx].tid = tid;
|
||||
g_launch_queue[idx].arg_size = arg_size;
|
||||
std::copy(args, args + arg_size, g_launch_queue[idx].args);
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
Result add_item(const LaunchItem *item) {
|
||||
if(item->arg_size > LAUNCH_QUEUE_ARG_SIZE_MAX) {
|
||||
return 0x209;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue