From 216893b69cb7b37b873b77388e45fa89c86bbd15 Mon Sep 17 00:00:00 2001 From: Greg Date: Sat, 5 Jun 2021 02:05:41 -0600 Subject: [PATCH] Fix bug with GoldHEN Modifying string. --- Orbis Toolbox/Mono.cpp | 51 ++++++++++++++++----------------- Orbis Toolbox/Orbis_Toolbox.cpp | 4 +-- Orbis Toolbox/Version.h | 22 +++++++------- 3 files changed, 37 insertions(+), 40 deletions(-) diff --git a/Orbis Toolbox/Mono.cpp b/Orbis Toolbox/Mono.cpp index dd1d02a..2768ac2 100644 --- a/Orbis Toolbox/Mono.cpp +++ b/Orbis Toolbox/Mono.cpp @@ -50,33 +50,32 @@ bool Mono::Init() Vsh_Lx = Get_Image("/%s/common/lib/Sce.Vsh.Lx.dll", sceKernelGetFsSandboxRandomWord()); SysfileUtilWrapper = Get_Image("/%s/common/lib/Sce.Vsh.SysfileUtilWrapper.dll", sceKernelGetFsSandboxRandomWord()); - char* Version = UI::Utilities::Get_Version_String(); - if (Version) + SceKernelSystemSwVersion Version; + Version.Size = sizeof(SceKernelSystemSwVersion); + sceKernelGetSystemSwVersion(&Version); + char Version_Short[] = { Version.info[1], Version.info[3], Version.info[4] }; + int Software_Version = atoi(Version_Short); + klog("Software Version: %s %i\n", Version.info, Software_Version); + + switch (Software_Version) { - char Version_Short[] = { Version[0], Version[2], Version[3] }; - int Software_Version = atoi(Version_Short); - klog("Software Version: %s %i\n", Version, Software_Version); - - switch (Software_Version) - { - default: - Notify("Unsuported Software Version!! \"%s\"(%i)", Version, Software_Version); - break; - - case 505: - PUI = "Sce.PlayStation.HighLevel.UI2"; - PUI_UI2 = "Sce.PlayStation.HighLevel.UI2"; - PUI_UI3 = "Sce.PlayStation.HighLevel.UI2"; - break; - - case 672: - case 702: - case 755: - PUI = "Sce.PlayStation.PUI"; - PUI_UI2 = "Sce.PlayStation.PUI.UI2"; - PUI_UI3 = "Sce.PlayStation.PUI.UI3"; - break; - } + default: + klog("Unsuported Software Version!! \"%s\"(%i)\n", Version.info, Software_Version); + break; + + case 505: + PUI = "Sce.PlayStation.HighLevel.UI2"; + PUI_UI2 = "Sce.PlayStation.HighLevel.UI2"; + PUI_UI3 = "Sce.PlayStation.HighLevel.UI2"; + break; + + case 672: + case 702: + case 755: + PUI = "Sce.PlayStation.PUI"; + PUI_UI2 = "Sce.PlayStation.PUI.UI2"; + PUI_UI3 = "Sce.PlayStation.PUI.UI3"; + break; } MonoLog("Init Complete"); diff --git a/Orbis Toolbox/Orbis_Toolbox.cpp b/Orbis Toolbox/Orbis_Toolbox.cpp index 2bf030b..bc3d80f 100644 --- a/Orbis Toolbox/Orbis_Toolbox.cpp +++ b/Orbis Toolbox/Orbis_Toolbox.cpp @@ -20,10 +20,10 @@ extern "C" Mono::Init(); + //TODO: Add buton combo that if detected here will cancel loading. //Sce.PlayStation.Core.Runtime DiagnosticsNative GetGraphicsMemoryStatistics //TODO: Get Address and offset take a look in IDA see if it calls imports. - //UI::Utilities::SetVersionString("5.05 OSM's Cool Firmware"); System_Monitor::Init(); Settings_Menu::Init(); //Title_Menu::Init(); @@ -37,8 +37,6 @@ extern "C" { klog("!! BYE !!\n"); - Notify("Orbis Toolbox: Unloading..."); - Settings_Menu::Term(); System_Monitor::Term(); //Title_Menu::Term(); diff --git a/Orbis Toolbox/Version.h b/Orbis Toolbox/Version.h index 4ba87cc..d9c9984 100644 --- a/Orbis Toolbox/Version.h +++ b/Orbis Toolbox/Version.h @@ -1,11 +1,11 @@ -#pragma once -#define ORBIS_TOOLBOX_MAJOR 1 -#define ORBIS_TOOLBOX_MINOR 0 -#define ORBIS_TOOLBOX_BUILDVERSION 1056 -#define stringify(a) stringify_(a) -#define stringify_(a) #a -#if defined(ORBIS_TOOLBOX_DEBUG) -#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Dev Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) -#else -#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) -#endif +#pragma once +#define ORBIS_TOOLBOX_MAJOR 1 +#define ORBIS_TOOLBOX_MINOR 0 +#define ORBIS_TOOLBOX_BUILDVERSION 1061 +#define stringify(a) stringify_(a) +#define stringify_(a) #a +#if defined(ORBIS_TOOLBOX_DEBUG) +#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Dev Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) +#else +#define ORBIS_TOOLBOX_BUILDSTRING ("[Orbis Toolbox Alpha Version " stringify(ORBIS_TOOLBOX_MAJOR) "." stringify(ORBIS_TOOLBOX_MINOR) "] Build " stringify(ORBIS_TOOLBOX_BUILDVERSION) " " __DATE__ " " __TIME__) +#endif