|
|
|
@ -150,7 +150,7 @@ Result IApplicationFunctions::EnsureSaveData(Out<u64> out_size, Common::UUID use |
|
|
|
Result IApplicationFunctions::GetDesiredLanguage(Out<u64> out_language_code) { |
|
|
|
// FIXME: all of this stuff belongs to ns
|
|
|
|
// TODO(bunnei): This should be configurable
|
|
|
|
LOG_DEBUG(Service_AM, "called"); |
|
|
|
LOG_DEBUG(Service_AM, "called, program_id={:016X}", m_applet->program_id); |
|
|
|
|
|
|
|
// Get supported languages from NACP, if possible
|
|
|
|
// Default to 0 (all languages supported)
|
|
|
|
@ -430,15 +430,16 @@ Result IApplicationFunctions::ExecuteProgram(ProgramSpecifyKind kind, u64 value) |
|
|
|
|
|
|
|
// https://switchbrew.org/wiki/Applet_Manager_services#CreateApplicationAndRequestToStart
|
|
|
|
Result IApplicationFunctions::CreateApplicationAndRequestToStart(u64 application_id) { |
|
|
|
LOG_INFO(Service_AM, "called, application_id={:016X}", application_id); |
|
|
|
LOG_INFO(Service_AM, "called, application_id={:016X} current_program_id={:016X}", application_id, m_applet->program_id); |
|
|
|
|
|
|
|
// If application_id is 0, relaunch the current application
|
|
|
|
const u64 target_application_id = |
|
|
|
(application_id == 0) ? m_applet->program_id : application_id; |
|
|
|
// If application_id is 0 or matches the current application, relaunch the current application.
|
|
|
|
if (application_id == 0 || application_id == m_applet->program_id) { |
|
|
|
system.GetUserChannel() = m_applet->user_channel_launch_parameter; |
|
|
|
system.ExecuteProgram(0); |
|
|
|
R_SUCCEED(); |
|
|
|
} |
|
|
|
|
|
|
|
system.GetUserChannel() = m_applet->user_channel_launch_parameter; |
|
|
|
system.ExecuteProgram(target_application_id); |
|
|
|
R_SUCCEED(); |
|
|
|
R_THROW(ResultUnknown); |
|
|
|
} |
|
|
|
|
|
|
|
Result IApplicationFunctions::ClearUserChannel() { |
|
|
|
|