Added appletGetSettingsPlatformRegion/appletSetHdcpAuthenticationActivated and improved docs.

This commit is contained in:
yellows8 2019-11-13 20:07:26 -05:00
parent d88f67fe30
commit 297e9d97a0
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
3 changed files with 27 additions and 0 deletions

View File

@ -14,6 +14,7 @@
#include "../services/pm.h" #include "../services/pm.h"
#include "../services/ncm_types.h" #include "../services/ncm_types.h"
#include "../services/acc.h" #include "../services/acc.h"
#include "../services/set.h"
#include "../kernel/tmem.h" #include "../kernel/tmem.h"
#include "../kernel/event.h" #include "../kernel/event.h"
#include "../nacp.h" #include "../nacp.h"
@ -556,6 +557,13 @@ Result appletGetCurrentPerformanceConfiguration(u32 *PerformanceConfiguration);
*/ */
Result appletGetOperationModeSystemInfo(u32 *info); Result appletGetOperationModeSystemInfo(u32 *info);
/**
* @brief This uses \ref setsysGetPlatformRegion internally.
* @note Only available with [9.0.0+].
* @param[out] out \ref SetSysPlatformRegion
*/
Result appletGetSettingsPlatformRegion(SetSysPlatformRegion *out);
///@} ///@}
///@name ISelfController ///@name ISelfController
@ -1457,6 +1465,13 @@ Result appletRestartProgram(const void* buffer, size_t size);
*/ */
Result appletGetPreviousProgramIndex(s32 *programIndex); Result appletGetPreviousProgramIndex(s32 *programIndex);
/**
* @brief SetHdcpAuthenticationActivated
* @note Only available with AppletType_*Application on [9.0.0+].
* @param[in] flag Whether HdcpAuthentication is activated.
*/
Result appletSetHdcpAuthenticationActivated(bool flag);
/** /**
* @brief CreateMovieMaker. Do not use this directly, use \ref grcCreateMovieMaker instead. * @brief CreateMovieMaker. Do not use this directly, use \ref grcCreateMovieMaker instead.
* @note Only available with AppletType_*Application on [5.0.0+]. * @note Only available with AppletType_*Application on [5.0.0+].

View File

@ -439,6 +439,7 @@ Result setsysGetHomeMenuScheme(SetSysHomeMenuScheme *out);
/** /**
* @brief Gets the \ref SetSysPlatformRegion. * @brief Gets the \ref SetSysPlatformRegion.
* @note This is used internally by \ref appletGetSettingsPlatformRegion.
* @note Only available on [9.0.0+]. * @note Only available on [9.0.0+].
* @param[out] out \ref SetSysPlatformRegion * @param[out] out \ref SetSysPlatformRegion
*/ */

View File

@ -962,6 +962,16 @@ IPC_MAKE_CMD_IMPL_HOSVER(Result appletSetPerformanceConfigurationChangedNotifica
IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetCurrentPerformanceConfiguration(u32 *PerformanceConfiguration), &g_appletICommonStateGetter, 91, _appletCmdNoInOutU32, (7,0,0), PerformanceConfiguration) IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetCurrentPerformanceConfiguration(u32 *PerformanceConfiguration), &g_appletICommonStateGetter, 91, _appletCmdNoInOutU32, (7,0,0), PerformanceConfiguration)
IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetOperationModeSystemInfo(u32 *info), &g_appletICommonStateGetter, 200, _appletCmdNoInOutU32, (7,0,0), info) IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetOperationModeSystemInfo(u32 *info), &g_appletICommonStateGetter, 200, _appletCmdNoInOutU32, (7,0,0), info)
Result appletGetSettingsPlatformRegion(SetSysPlatformRegion *out) {
if (hosversionBefore(9,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
u8 tmp=0;
Result rc = _appletCmdNoInOutU8(&g_appletICommonStateGetter, &tmp, 300);
if (R_SUCCEEDED(rc) && out) *out = tmp;
return rc;
}
// ISelfController // ISelfController
IPC_MAKE_CMD_IMPL(static Result _appletSelfExit(void), &g_appletISelfController, 0, _appletCmdNoIO) IPC_MAKE_CMD_IMPL(static Result _appletSelfExit(void), &g_appletISelfController, 0, _appletCmdNoIO)
@ -2219,6 +2229,7 @@ Result appletRestartProgram(const void* buffer, size_t size) {
} }
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetPreviousProgramIndex(s32 *programIndex), &g_appletIFunctions, 123, _appletCmdNoInOutU32, !_appletIsApplication(), (5,0,0), (u32*)programIndex) IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetPreviousProgramIndex(s32 *programIndex), &g_appletIFunctions, 123, _appletCmdNoInOutU32, !_appletIsApplication(), (5,0,0), (u32*)programIndex)
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletSetHdcpAuthenticationActivated(bool flag), &g_appletIFunctions, 170, _appletCmdInBoolNoOut, !_appletIsApplication(), (9,0,0), flag)
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletCreateMovieMaker(Service* srv_out, TransferMemory *tmem), &g_appletIFunctions, 1000, _appletCmdInTmemOutSession, !_appletIsApplication(), (5,0,0), srv_out, tmem) IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletCreateMovieMaker(Service* srv_out, TransferMemory *tmem), &g_appletIFunctions, 1000, _appletCmdInTmemOutSession, !_appletIsApplication(), (5,0,0), srv_out, tmem)
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletPrepareForJit(void), &g_appletIFunctions, 1001, _appletCmdNoIO, !_appletIsApplication(), (5,0,0)) IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletPrepareForJit(void), &g_appletIFunctions, 1001, _appletCmdNoIO, !_appletIsApplication(), (5,0,0))