mirror of
https://github.com/switchbrew/libnx.git
synced 2025-08-06 08:19:22 +02:00
web: Added 11.0 webConfigSetTransferMemory().
This commit is contained in:
parent
41fc8bb17c
commit
55179074cc
@ -227,6 +227,7 @@ typedef enum {
|
|||||||
WebArgType_SessionBootMode = 0x41, ///< [7.0.0+] u32 enum \ref WebSessionBootMode
|
WebArgType_SessionBootMode = 0x41, ///< [7.0.0+] u32 enum \ref WebSessionBootMode
|
||||||
WebArgType_SessionFlag = 0x42, ///< [7.0.0+] u8 bool, enables using WebSession when set.
|
WebArgType_SessionFlag = 0x42, ///< [7.0.0+] u8 bool, enables using WebSession when set.
|
||||||
WebArgType_MediaPlayerUi = 0x43, ///< [8.0.0+] u8 bool
|
WebArgType_MediaPlayerUi = 0x43, ///< [8.0.0+] u8 bool
|
||||||
|
WebArgType_TransferMemory = 0x44, ///< [11.0.0+] u8 bool
|
||||||
} WebArgType;
|
} WebArgType;
|
||||||
|
|
||||||
/// Types for \ref WebArgTLV, output storage.
|
/// Types for \ref WebArgTLV, output storage.
|
||||||
@ -713,6 +714,14 @@ Result webConfigSetBootMode(WebCommonConfig* config, WebSessionBootMode mode);
|
|||||||
*/
|
*/
|
||||||
Result webConfigSetMediaPlayerUi(WebCommonConfig* config, bool flag);
|
Result webConfigSetMediaPlayerUi(WebCommonConfig* config, bool flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets whether TransferMemory is enabled.
|
||||||
|
* @note Only available with config created by \ref webPageCreate on [11.0.0+].
|
||||||
|
* @param config WebCommonConfig object.
|
||||||
|
* @param flag Flag
|
||||||
|
*/
|
||||||
|
Result webConfigSetTransferMemory(WebCommonConfig* config, bool flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the {web applet} with the specified config and waits for it to exit.
|
* @brief Launches the {web applet} with the specified config and waits for it to exit.
|
||||||
* @param config WebCommonConfig object.
|
* @param config WebCommonConfig object.
|
||||||
|
@ -702,6 +702,12 @@ Result webConfigSetMediaPlayerUi(WebCommonConfig* config, bool flag) {
|
|||||||
return _webConfigSetFlag(config, WebArgType_MediaPlayerUi, flag);
|
return _webConfigSetFlag(config, WebArgType_MediaPlayerUi, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result webConfigSetTransferMemory(WebCommonConfig* config, bool flag) {
|
||||||
|
if (_webGetShimKind(config) != WebShimKind_Web) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
|
if (hosversionBefore(11,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
return _webConfigSetFlag(config, WebArgType_TransferMemory, flag);
|
||||||
|
}
|
||||||
|
|
||||||
static void _webConfigInitReply(WebCommonConfig* config, WebCommonReply *out, void** reply, size_t *reply_size) {
|
static void _webConfigInitReply(WebCommonConfig* config, WebCommonReply *out, void** reply, size_t *reply_size) {
|
||||||
if (out) {
|
if (out) {
|
||||||
// ShareApplet on [3.0.0+] uses TLV storage for the reply, while older versions + everything else uses *ReturnValue.
|
// ShareApplet on [3.0.0+] uses TLV storage for the reply, while older versions + everything else uses *ReturnValue.
|
||||||
|
Loading…
Reference in New Issue
Block a user