mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Support passing NULL for webConfigShow out. Minor docs adjustment.
This commit is contained in:
parent
9e52d7c4df
commit
4160622165
@ -217,8 +217,8 @@ Result webPageCreate(WebCommonConfig* config, const char* url);
|
||||
|
||||
/**
|
||||
* @brief Creates the config for WebApplet. This is based on \ref webPageCreate, for News. Hence other functions referencing \ref webPageCreate also apply to this.
|
||||
* @note Sets ::WebArgType_UnknownD to value 1, and sets ::WebArgType_NewsFlag to true. Also uses \ref webConfigSetEcClientCert and \ref webConfigSetShopJump with flag=true.
|
||||
* @note The domain from the input URL is automatically whitelisted, in addition to any already loaded whitelist.
|
||||
* @note Sets ::WebArgType_UnknownD to value 1, and sets ::WebArgType_NewsFlag to true. Also uses \ref webConfigSetEcClientCert and \ref webConfigSetShopJump with flag=true.
|
||||
* @param config WebCommonConfig object.
|
||||
* @param url Initial URL navigated to by the applet.
|
||||
*/
|
||||
|
@ -593,20 +593,22 @@ Result webConfigSetPageScrollIndicator(WebCommonConfig* config, bool flag) {
|
||||
}
|
||||
|
||||
Result webConfigShow(WebCommonConfig* config, WebCommonReply *out) {
|
||||
void* reply;
|
||||
size_t size;
|
||||
void* reply = NULL;
|
||||
size_t size = 0;
|
||||
|
||||
// ShareApplet on [3.0.0+] uses TLV storage for the reply, while older versions + everything else uses *ReturnValue.
|
||||
memset(out, 0, sizeof(*out));
|
||||
if (config->version >= 0x30000 && _webGetShimKind(config) == WebShimKind_Share) out->type = true;
|
||||
if (out) {
|
||||
// ShareApplet on [3.0.0+] uses TLV storage for the reply, while older versions + everything else uses *ReturnValue.
|
||||
memset(out, 0, sizeof(*out));
|
||||
if (config->version >= 0x30000 && _webGetShimKind(config) == WebShimKind_Share) out->type = true;
|
||||
|
||||
if (!out->type) {
|
||||
reply = &out->ret;
|
||||
size = sizeof(out->ret);
|
||||
}
|
||||
else {
|
||||
reply = &out->storage;
|
||||
size = sizeof(out->storage);
|
||||
if (!out->type) {
|
||||
reply = &out->ret;
|
||||
size = sizeof(out->ret);
|
||||
}
|
||||
else {
|
||||
reply = &out->storage;
|
||||
size = sizeof(out->storage);
|
||||
}
|
||||
}
|
||||
|
||||
return _webShow(&config->holder, config->appletid, config->version, &config->arg, sizeof(config->arg), reply, size);
|
||||
|
Loading…
Reference in New Issue
Block a user