mirror of
https://github.com/wiiu-env/libsdutils.git
synced 2024-11-22 02:59:15 +01:00
Rename SDUtils_Init to SDUtils_InitLibrary and SDUtils_DeInit to SDUtils_DeInitLibrary
This commit is contained in:
parent
b8598214ff
commit
6ac5751bd7
@ -36,7 +36,13 @@ typedef void (*SDCleanUpHandlesHandlerFn)();
|
||||
* SDUTILS_RESULT_MODULE_NOT_FOUND when the SDHotSwapModule is not loaded
|
||||
* SDUTILS_RESULT_MODULE_MISSING_EXPORT when the SDHotSwapModule does not export the expected functions.
|
||||
*/
|
||||
SDUtilsStatus SDUtils_Init();
|
||||
SDUtilsStatus SDUtils_InitLibrary();
|
||||
|
||||
/**
|
||||
* Deinitializes the SDUtils library, must be called before exiting the application
|
||||
* @return SDUTILS_RESULT_SUCCESS on success
|
||||
*/
|
||||
SDUtilsStatus SDUtils_DeInitLibrary();
|
||||
|
||||
/**
|
||||
* Returns the API Version of the WUHBUtils Module.
|
||||
@ -44,11 +50,6 @@ SDUtilsStatus SDUtils_Init();
|
||||
*/
|
||||
SDUtilsVersion SDUtils_GetVersion();
|
||||
|
||||
/**
|
||||
* Deinitializes the SDUtils library, must be called before exiting the application
|
||||
* @return SDUTILS_RESULT_SUCCESS on success
|
||||
*/
|
||||
SDUtilsStatus SDUtils_DeInit();
|
||||
|
||||
/**
|
||||
* Registers a callback which will be called whenever a sd card will be inserted or ejected.
|
||||
|
@ -13,7 +13,7 @@ static bool (*sSDUtilsRemoveAttachHandler)(SDAttachHandlerFn) = nullptr;
|
||||
static bool (*sSDUtilsAddCleanUpHandlesHandler)(SDCleanUpHandlesHandlerFn) = nullptr;
|
||||
static bool (*sSDUtilsRemoveCleanUpHandlesHandler)(SDCleanUpHandlesHandlerFn) = nullptr;
|
||||
|
||||
SDUtilsStatus SDUtils_Init() {
|
||||
SDUtilsStatus SDUtils_InitLibrary() {
|
||||
if (OSDynLoad_Acquire("homebrew_sdhotswap", &sModuleHandle) != OS_DYNLOAD_OK) {
|
||||
OSReport("SDUtils_Init: OSDynLoad_Acquire failed.\n");
|
||||
return SDUTILS_RESULT_MODULE_NOT_FOUND;
|
||||
@ -51,6 +51,11 @@ SDUtilsStatus SDUtils_Init() {
|
||||
return SDUTILS_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
SDUtilsStatus SDUtils_DeInitLibrary() {
|
||||
// We don't need to release the OSDynLoad handle for modules.
|
||||
return SDUTILS_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
SDUtilsVersion GetVersion();
|
||||
SDUtilsVersion SDUtils_GetVersion() {
|
||||
if (sSDUtilsGetVersion == nullptr) {
|
||||
@ -60,11 +65,6 @@ SDUtilsVersion SDUtils_GetVersion() {
|
||||
return reinterpret_cast<decltype(&GetVersion)>(sSDUtilsGetVersion)();
|
||||
}
|
||||
|
||||
SDUtilsStatus SDUtils_DeInit() {
|
||||
// We don't need to release the OSDynLoad handle for modules.
|
||||
return SDUTILS_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
SDUtilsStatus SDUtils_IsSdCardMounted(bool *status) {
|
||||
if (status == nullptr) {
|
||||
return SDUTILS_RESULT_INVALID_ARGUMENT;
|
||||
|
Loading…
Reference in New Issue
Block a user