Add WUPSConfigAPI_Menu_GetStatus() function. (#89)

* Add `WUPSConfigAPI_Menu_GetStatus()` function.

--HG--
branch : menu-status-api-hg

* Indentation fix.

--HG--
branch : menu-status-api-hg

---------

Co-authored-by: Daniel K. O. (dkosmari) <none@none>
This commit is contained in:
Daniel K. O.
2024-12-01 05:13:16 -03:00
committed by Maschell
parent d2c1530084
commit 54f8bdc538
5 changed files with 24 additions and 12 deletions

View File

@@ -315,7 +315,18 @@ namespace WUPSConfigAPIBackend {
return WUPSCONFIG_API_RESULT_SUCCESS;
}
WUPSConfigAPIStatus WUPSConfigAPI_Menu_GetStatus(WUPSConfigAPIMenuStatus *status) {
if (status == nullptr) {
return WUPSCONFIG_API_RESULT_INVALID_ARGUMENT;
}
*status = gConfigMenuOpened
? WUPSCONFIG_API_MENU_STATUS_OPENED
: WUPSCONFIG_API_MENU_STATUS_CLOSED;
return WUPSCONFIG_API_RESULT_SUCCESS;
}
WUMS_EXPORT_FUNCTION(WUPSConfigAPI_GetVersion);
WUMS_EXPORT_FUNCTION(WUPSConfigAPI_Menu_GetStatus);
WUMS_EXPORT_FUNCTION_EX(WUPSConfigAPIBackend::InitEx, WUPSConfigAPI_InitEx);
WUMS_EXPORT_FUNCTION_EX(WUPSConfigAPIBackend::Category::Create, WUPSConfigAPI_Category_CreateEx);