mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-25 00:00:45 +01:00
a097babe18
* boot2: Simplify g_additional_launch_programs It appears that Stratosphère is targeting C++17. In C++17, std::make_tuple is not required for initialisating a tuple anymore. Same thing, but less typing * Replace std::make_tuple with {} More readable and less noise. Also fixes two missing return statements.
32 lines
1.1 KiB
C++
32 lines
1.1 KiB
C++
#include <switch.h>
|
|
#include "ldr_shell.hpp"
|
|
#include "ldr_launch_queue.hpp"
|
|
|
|
Result ShellService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) {
|
|
|
|
Result rc = 0xF601;
|
|
|
|
switch ((ShellServiceCmd)cmd_id) {
|
|
case Shell_Cmd_AddTitleToLaunchQueue:
|
|
rc = WrapIpcCommandImpl<&ShellService::add_title_to_launch_queue>(this, r, out_c, pointer_buffer, pointer_buffer_size);
|
|
break;
|
|
case Shell_Cmd_ClearLaunchQueue:
|
|
rc = WrapIpcCommandImpl<&ShellService::clear_launch_queue>(this, r, out_c, pointer_buffer, pointer_buffer_size);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return rc;
|
|
}
|
|
|
|
std::tuple<Result> ShellService::add_title_to_launch_queue(u64 tid, InPointer<char> args) {
|
|
fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements);
|
|
return {LaunchQueue::add(tid, args.pointer, args.num_elements)};
|
|
}
|
|
|
|
std::tuple<Result> ShellService::clear_launch_queue(u64 dat) {
|
|
fprintf(stderr, "Clear launch queue: %lx\n", dat);
|
|
LaunchQueue::clear();
|
|
return {0};
|
|
}
|