From 41b976ed9ea6bbf4163cb8cc9d62c530aefdd6b8 Mon Sep 17 00:00:00 2001 From: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Date: Sun, 30 Aug 2026 20:05:33 -0400 Subject: [PATCH] fix: the cheeky fix for orbis --- Minecraft.Client/Common/Consoles_App.cpp | 8 +++---- .../Sony/PlatformNetworkManagerSony.cpp | 4 +--- .../Common/Network/Sony/SonyCommerce.h | 3 +-- .../Common/UI/UIScene_DLCMainMenu.cpp | 14 ++++-------- .../Common/UI/UIScene_DLCOffersMenu.cpp | 6 ++--- .../Orbis/Network/SonyCommerce_Orbis.cpp | 22 ++++++++++++++++++- .../Orbis/Network/SonyCommerce_Orbis.h | 2 ++ 7 files changed, 34 insertions(+), 25 deletions(-) diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 7e14c4b0..a3f71d42 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -4419,9 +4419,7 @@ int CMinecraftApp::EthernetDisconnectReturned(void *pParam,int iPad,const C4JSto else { // 4J-PB - turn off the PSN store icon just in case this happened when we were in one of the DLC menus -#ifdef __ORBIS__ - sceNpCommerceHidePsStoreIcon(); -#elif defined __PSVITA__ +#if defined __PSVITA__ || defined __ORBIS__ app.GetCommerce()->HidePsStoreIcon(); #endif app.SetAction(iPad,eAppAction_EthernetDisconnectedReturned_Menus); @@ -6648,7 +6646,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) switch(uiVKey) { case VK_PAD_A: -#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) +#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) || defined(_WINDOWS64) if( InputManager.IsCircleCrossSwapped() ) replacement = L"ButtonB"; else replacement = L"ButtonA"; #else @@ -10048,7 +10046,7 @@ enum ETitleUpdateTexturePacks }; #ifdef _WINDOWS64 -wstring titleUpdateTexturePackRoot = L"Windows64\\DLC\\"; +wstring titleUpdateTexturePackRoot = L"Windows64Media\\DLC\\"; #elif defined(__ORBIS__) wstring titleUpdateTexturePackRoot = L"app0/Orbis/DLC/"; #elif defined(__PSVITA__) diff --git a/Minecraft.Client/Common/Network/Sony/PlatformNetworkManagerSony.cpp b/Minecraft.Client/Common/Network/Sony/PlatformNetworkManagerSony.cpp index 64bc1d67..3c138570 100644 --- a/Minecraft.Client/Common/Network/Sony/PlatformNetworkManagerSony.cpp +++ b/Minecraft.Client/Common/Network/Sony/PlatformNetworkManagerSony.cpp @@ -54,9 +54,7 @@ void CPlatformNetworkManagerSony::HandleStateChange(SQRNetworkManager::eSQRNetwo else if( newState == SQRNetworkManager::SNM_STATE_JOINING ) { // 4J Stu - We may be accepting an invite from the DLC menu, so hide the icon -#ifdef __ORBIS__ - sceNpCommerceHidePsStoreIcon(); -#elif defined __PSVITA__ +#if defined __PSVITA__ || defined __ORBIS__ app.GetCommerce()->HidePsStoreIcon(); #endif m_bLeavingGame = false; diff --git a/Minecraft.Client/Common/Network/Sony/SonyCommerce.h b/Minecraft.Client/Common/Network/Sony/SonyCommerce.h index d70ec005..84f4581b 100644 --- a/Minecraft.Client/Common/Network/Sony/SonyCommerce.h +++ b/Minecraft.Client/Common/Network/Sony/SonyCommerce.h @@ -170,8 +170,7 @@ public: virtual void CheckForTrialUpgradeKey() = 0; virtual bool LicenseChecked() = 0; -// str1k3r: Currently does not work on Orbis. -#if defined __PSVITA__ // || defined __ORBIS__ +#if defined __PSVITA__ || defined __ORBIS__ virtual void ShowPsStoreIcon() = 0; virtual void HidePsStoreIcon() = 0; #endif diff --git a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp index b2147311..155ff399 100644 --- a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp @@ -53,10 +53,8 @@ UIScene_DLCMainMenu::UIScene_DLCMainMenu(int iPad, void *initData, UILayer *pare TelemetryManager->RecordMenuShown(iPad, eUIScene_DLCMainMenu, 0); -#ifdef __ORBIS__ - sceNpCommerceShowPsStoreIcon(SCE_NP_COMMERCE_PS_STORE_ICON_RIGHT); -#elif defined __PSVITA__ - sceNpCommerce2ShowPsStoreIcon(SCE_NP_COMMERCE2_ICON_DISP_RIGHT); +#if defined __ORBIS__ || defined __PSVITA__ + app.GetCommerce()->ShowPsStoreIcon(); #endif #if ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ ) @@ -98,9 +96,7 @@ void UIScene_DLCMainMenu::handleInput(int iPad, int key, bool repeat, bool press case ACTION_MENU_CANCEL: if(pressed) { -#ifdef __ORBIS__ - sceNpCommerceHidePsStoreIcon(); -#elif defined __PSVITA__ +#if defined __PSVITA__ || defined __ORBIS__ app.GetCommerce()->HidePsStoreIcon(); #endif navigateBack(); @@ -172,9 +168,7 @@ int UIScene_DLCMainMenu::ExitDLCMainMenu(void *pParam,int iPad,C4JStorage::EMess { UIScene_DLCMainMenu* pClass = (UIScene_DLCMainMenu*)pParam; -#ifdef __ORBIS__ - sceNpCommerceHidePsStoreIcon(); -#elif defined __PSVITA__ +#if defined __PSVITA__ || defined __ORBIS__ app.GetCommerce()->HidePsStoreIcon(); #endif pClass->navigateBack(); diff --git a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp index cf08371b..72a79412 100644 --- a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp @@ -105,10 +105,8 @@ int UIScene_DLCOffersMenu::ExitDLCOffersMenu(void *pParam,int iPad,C4JStorage::E { UIScene_DLCOffersMenu* pClass = (UIScene_DLCOffersMenu*)pParam; -#ifdef __ORBIS__ - sceNpCommerceHidePsStoreIcon(); -#elif defined __PSVITA__ - app.GetCommerce()->HidePsStoreIcon(); +#if defined __PSVITA__ || defined __ORBIS__ + app.GetCommerce()->HidePsStoreIcon(); #endif ui.NavigateToHomeMenu();//iPad,eUIScene_MainMenu); diff --git a/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.cpp b/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.cpp index e90aea8a..3feca2b5 100644 --- a/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.cpp +++ b/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.cpp @@ -44,12 +44,13 @@ bool SonyCommerce_Orbis::m_bLicenseChecked=false; // Check the trial/ -#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 +#if 0 // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 sce::Toolkit::NP::Utilities::Future > g_productList; sce::Toolkit::NP::Utilities::Future g_categoryInfo; sce::Toolkit::NP::Utilities::Future g_detailedProductInfo; #endif +static bool s_showingPSStoreIcon = false; SonyCommerce_Orbis::ProductInfoDetailed s_trialUpgradeProductInfoDetailed; void SonyCommerce_Orbis::Delete() @@ -1304,6 +1305,25 @@ void SonyCommerce_Orbis::DownloadAlreadyPurchased_Game( CallbackFunc cb, LPVOID LeaveCriticalSection(&m_queueLock); } +void SonyCommerce_Orbis::ShowPsStoreIcon() +{ + if(!s_showingPSStoreIcon) + { + sceNpCommerceShowPsStoreIcon(SCE_NP_COMMERCE_PS_STORE_ICON_RIGHT); + s_showingPSStoreIcon = true; + } +} + +void SonyCommerce_Orbis::HidePsStoreIcon() +{ + if(s_showingPSStoreIcon) + { + sceNpCommerceHidePsStoreIcon(); + s_showingPSStoreIcon = false; + } +} + + /* bool g_bDoCommerceCreateSession = false; diff --git a/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.h b/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.h index 4750a001..be75b3af 100644 --- a/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.h +++ b/Minecraft.Client/Orbis/Network/SonyCommerce_Orbis.h @@ -179,4 +179,6 @@ public: virtual void CheckForTrialUpgradeKey(); virtual bool LicenseChecked(); + virtual void ShowPsStoreIcon(); + virtual void HidePsStoreIcon(); };