diff --git a/src/user/config_mgr.cpp b/src/user/config_mgr.cpp index 43cf567..4a8168b 100644 --- a/src/user/config_mgr.cpp +++ b/src/user/config_mgr.cpp @@ -83,11 +83,14 @@ int saveCheckBoxState(const char *refID, int val) int saveSlidebarState(const char *refId, SceFloat32 val) { int ret = CONFIG_MGR_OK; - if(ret = preSetup(), ret < 0) return ret; - + if(ret = preSetup(), ret < 0) + { + print("preSetup() Failed!\n"); + return ret; + } char key[0x400] = {0}; sce_paf_snprintf(key, 0x400, SLIDEBAR_SAVE_DIR "%s", refId); - + print("Saving to: %s\n", key); ret = writeFloatToFile(key, val); return ret; diff --git a/src/user/default_handlers.cpp b/src/user/default_handlers.cpp index 340126d..c95d4ff 100644 --- a/src/user/default_handlers.cpp +++ b/src/user/default_handlers.cpp @@ -13,7 +13,11 @@ void defaultCheckBoxSave(const char *refID) void defaultSliderSave(const char *refID) { widgetData *data = currentWidgets.GetNode(refID); - if(data == NULL) return; + if(data == NULL) + { + print("Error cannot find widget!\n"); + return; + } saveSlidebarState(refID, ((ProgressBarTouch *)data->widget)->currentValue); } diff --git a/src/user/event_handler.cpp b/src/user/event_handler.cpp index a7ffd98..1f2a4ed 100644 --- a/src/user/event_handler.cpp +++ b/src/user/event_handler.cpp @@ -13,8 +13,9 @@ void QMREventHandler::onGet(SceInt32 eventId, Widget *self, SceInt32, ScePVoid p { widgetData *widgetInfo = *(widgetData **)puserData; - if(puserData == NULL || self == NULL || widgetInfo == NULL || widgetInfo->CallbackNum == 0 || widgetInfo->Callbacks == NULL) return; - + if(puserData == NULL || self == NULL || widgetInfo == NULL || widgetInfo->CallbackNum == 0 || widgetInfo->Callbacks == NULL) + return; + for (int i = 0; i < widgetInfo->CallbackNum; i++) { if(widgetInfo->Callbacks[i].function != NULL && widgetInfo->Callbacks[i].id == eventId) diff --git a/src/user/widgets.cpp b/src/user/widgets.cpp index bfc7c2c..2187e4a 100644 --- a/src/user/widgets.cpp +++ b/src/user/widgets.cpp @@ -126,7 +126,7 @@ int summon(widgetData *data) if(data->OnLoad != NULL) data->OnLoad(data->refId); - + return; } @@ -169,6 +169,8 @@ SceInt32 QMR::RegisterEventHandler(SceInt32 id, widgetData *dat, ECallback Funct dat->Callbacks[dat->CallbackNum].userDat = userDat; dat->CallbackNum++; + + print("%s: Assigned callback for function: %p id: 0x%X\n", dat->refId, Function, id); return 0; }