mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-23 21:32:39 +02:00
Expose libappletCreateWriteStorage.
This commit is contained in:
parent
1415df75e4
commit
d90893c566
@ -34,6 +34,14 @@ void libappletArgsCreate(LibAppletArgs* a, u32 version);
|
||||
*/
|
||||
void libappletArgsSetPlayStartupSound(LibAppletArgs* a, bool flag);
|
||||
|
||||
/**
|
||||
* @brief Creates an AppletStorage with the specified size and writes the buffer contents to that storage at offset 0.
|
||||
* @param[out] s Storage object.
|
||||
* @param buffer Input buffer.
|
||||
* @param size Size to write.
|
||||
*/
|
||||
Result libappletCreateWriteStorage(AppletStorage* s, const void* buffer, size_t size);
|
||||
|
||||
/**
|
||||
* @brief Reads data from offset 0 from the specified storage into the buffer. If the storage-size is smaller than the size param, the storage-size is used instead.
|
||||
* @param s Storage object.
|
||||
|
@ -19,7 +19,7 @@ void libappletArgsSetPlayStartupSound(LibAppletArgs* a, bool flag) {
|
||||
a->PlayStartupSound = flag!=0;
|
||||
}
|
||||
|
||||
static Result _libappletCreateWriteStorage(AppletStorage* s, const void* buffer, size_t size) {
|
||||
Result libappletCreateWriteStorage(AppletStorage* s, const void* buffer, size_t size) {
|
||||
Result rc=0;
|
||||
|
||||
rc = appletCreateStorage(s, size);
|
||||
@ -54,7 +54,7 @@ static Result _libappletPushInData(AppletHolder *h, const void* buffer, size_t s
|
||||
Result rc=0;
|
||||
AppletStorage storage;
|
||||
|
||||
rc = _libappletCreateWriteStorage(&storage, buffer, size);
|
||||
rc = libappletCreateWriteStorage(&storage, buffer, size);
|
||||
if (R_FAILED(rc)) return rc;
|
||||
|
||||
return appletHolderPushInData(h, &storage);
|
||||
@ -73,7 +73,7 @@ static Result _libappletQlaunchRequest(u8* buf, size_t size) {
|
||||
Result rc=0;
|
||||
AppletStorage storage;
|
||||
|
||||
rc = _libappletCreateWriteStorage(&storage, buf, size);
|
||||
rc = libappletCreateWriteStorage(&storage, buf, size);
|
||||
if (R_FAILED(rc)) return rc;
|
||||
|
||||
return appletPushToGeneralChannel(&storage);
|
||||
|
Loading…
Reference in New Issue
Block a user