void __UtilityDoState(PointerWrap &p) { auto s = p.Section("sceUtility", 1, 2); if (!s) { return; } p.Do(currentDialogType); p.Do(currentDialogActive); saveDialog.DoState(p); msgDialog.DoState(p); oskDialog.DoState(p); netDialog.DoState(p); screenshotDialog.DoState(p); gamedataInstallDialog.DoState(p); if (s >= 2) { p.Do(currentlyLoadedModules); } else { std::set<int> oldModules; p.Do(oldModules); for (auto it = oldModules.begin(), end = oldModules.end(); it != end; ++it) { currentlyLoadedModules[*it] = 0; } } }
void __UtilityShutdown() { saveDialog.Shutdown(true); msgDialog.Shutdown(true); oskDialog.Shutdown(true); netDialog.Shutdown(true); screenshotDialog.Shutdown(true); gamedataInstallDialog.Shutdown(true); }
int sceUtilityGamedataInstallUpdate(int Speed) { if (currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) { WARN_LOG(SCEUTILITY, "sceUtilityGamedataInstallUpdate(): wrong dialog type"); return SCE_ERROR_UTILITY_WRONG_TYPE; } DEBUG_LOG(SCEUTILITY, "sceUtilityGamedataInstallUpdate(%i)", Speed); return gamedataInstallDialog.Update(); }
static int sceUtilityGamedataInstallUpdate(int animSpeed) { if (currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) { WARN_LOG(SCEUTILITY, "sceUtilityGamedataInstallUpdate(%i): wrong dialog type", animSpeed); return SCE_ERROR_UTILITY_WRONG_TYPE; } int ret = gamedataInstallDialog.Update(animSpeed); DEBUG_LOG(SCEUTILITY, "%08x=sceUtilityGamedataInstallUpdate(%i)", ret, animSpeed); return ret; }
static int sceUtilityGamedataInstallShutdownStart() { if (currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) { WARN_LOG(SCEUTILITY, "sceUtilityGamedataInstallShutdownStart(): wrong dialog type"); return SCE_ERROR_UTILITY_WRONG_TYPE; } currentDialogActive = false; DEBUG_LOG(SCEUTILITY, "sceUtilityGamedataInstallShutdownStart()"); return gamedataInstallDialog.Shutdown(); }
int sceUtilityGamedataInstallGetStatus() { if (currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) { WARN_LOG(SCEUTILITY, "sceUtilityGamedataInstallGetStatus(): wrong dialog type"); return SCE_ERROR_UTILITY_WRONG_TYPE; } int status = gamedataInstallDialog.GetStatus(); DEBUG_LOG(SCEUTILITY, "%08x=sceUtilityGamedataInstallGetStatus()", status); return status; }
int sceUtilityGamedataInstallInitStart(u32 paramsAddr) { if (currentDialogActive && currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) { WARN_LOG(SCEUTILITY, "sceUtilityGamedataInstallInitStart(%08x): wrong dialog type", paramsAddr); return SCE_ERROR_UTILITY_WRONG_TYPE; } DEBUG_LOG(SCEUTILITY, "sceUtilityGamedataInstallInitStart(%08x)", paramsAddr); currentDialogType = UTILITY_DIALOG_GAMEDATAINSTALL; currentDialogActive = true; return gamedataInstallDialog.Init(paramsAddr); }
static int sceUtilityGamedataInstallAbort() { if (currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) { WARN_LOG(SCEUTILITY, "sceUtilityGamedataInstallAbort(): wrong dialog type"); return SCE_ERROR_UTILITY_WRONG_TYPE; } currentDialogActive = false; int ret = gamedataInstallDialog.Abort(); DEBUG_LOG(SCEUTILITY, "%08x=sceUtilityGamedataInstallDialogAbort",ret); return ret; }
static int sceUtilityGamedataInstallGetStatus() { if (currentDialogType != UTILITY_DIALOG_GAMEDATAINSTALL) { // This is called incorrectly all the time by some games. So let's not bother warning. // WARN_LOG(SCEUTILITY, "sceUtilityGamedataInstallGetStatus(): wrong dialog type"); return SCE_ERROR_UTILITY_WRONG_TYPE; } int status = gamedataInstallDialog.GetStatus(); DEBUG_LOG(SCEUTILITY, "%08x=sceUtilityGamedataInstallGetStatus()", status); return status; }
void __UtilityDoState(PointerWrap &p) { auto s = p.Section("sceUtility", 1); if (!s) return; p.Do(currentDialogType); p.Do(currentDialogActive); saveDialog.DoState(p); msgDialog.DoState(p); oskDialog.DoState(p); netDialog.DoState(p); screenshotDialog.DoState(p); gamedataInstallDialog.DoState(p); p.Do(currentlyLoadedModules); }
int sceUtilityGamedataInstallUpdate(int speed) { ERROR_LOG(SCEUTILITY, "UNIMPL sceUtilityGamedataInstallUpdate(%08x)", speed); gamedataInstallDialog.Abort(); return 0; }