fixed vita startup crash by guarding commerce calls (#21)
Commerce calls are now guarded with `#elif defined(__PSVITA__) && !defined(DISABLE_PSN)` --------- Co-authored-by: 552eden <552eden@gmail.com> Reviewed-on: #21 Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost>
This commit was merged in pull request #21.
This commit is contained in:
@@ -4419,7 +4419,7 @@ int CMinecraftApp::EthernetDisconnectReturned(void *pParam,int iPad,const C4JSto
|
||||
// 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__
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
app.SetAction(iPad,eAppAction_EthernetDisconnectedReturned_Menus);
|
||||
|
||||
@@ -56,7 +56,7 @@ void CPlatformNetworkManagerSony::HandleStateChange(SQRNetworkManager::eSQRNetwo
|
||||
// 4J Stu - We may be accepting an invite from the DLC menu, so hide the icon
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceHidePsStoreIcon();
|
||||
#elif defined __PSVITA__
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
m_bLeavingGame = false;
|
||||
|
||||
@@ -100,7 +100,7 @@ void UIScene_DLCMainMenu::handleInput(int iPad, int key, bool repeat, bool press
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceHidePsStoreIcon();
|
||||
#elif defined __PSVITA__
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
navigateBack();
|
||||
@@ -174,7 +174,7 @@ int UIScene_DLCMainMenu::ExitDLCMainMenu(void *pParam,int iPad,C4JStorage::EMess
|
||||
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceHidePsStoreIcon();
|
||||
#elif defined __PSVITA__
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
pClass->navigateBack();
|
||||
|
||||
@@ -107,7 +107,7 @@ int UIScene_DLCOffersMenu::ExitDLCOffersMenu(void *pParam,int iPad,C4JStorage::E
|
||||
|
||||
#ifdef __ORBIS__
|
||||
sceNpCommerceHidePsStoreIcon();
|
||||
#elif defined __PSVITA__
|
||||
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
ui.NavigateToHomeMenu();//iPad,eUIScene_MainMenu);
|
||||
|
||||
@@ -46,6 +46,7 @@ CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
|
||||
|
||||
m_pSaveToDelete = NULL;
|
||||
m_pCheckoutProductInfo = NULL;
|
||||
m_pCommerce = NULL;
|
||||
}
|
||||
|
||||
void CConsoleMinecraftApp::SetRichPresenceContext(int iPad, int contextId)
|
||||
@@ -1080,7 +1081,7 @@ void CConsoleMinecraftApp::AppEventTick()
|
||||
|
||||
bool CConsoleMinecraftApp::CheckForEmptyStore(int iPad)
|
||||
{
|
||||
#ifdef VITA_COMMERCE
|
||||
#ifdef VITA_COMMERCE_ENABLED
|
||||
SonyCommerce::CategoryInfo *pCategories=app.GetCategoryInfo();
|
||||
|
||||
bool bEmptyStore=true;
|
||||
|
||||
@@ -665,7 +665,9 @@ int main()
|
||||
app.CommerceInit(); // MGH - moved this here so GetCommerce isn't NULL
|
||||
|
||||
// 4J-PB - Kick of the check for trial or full version - requires ui to be initialised
|
||||
#ifndef DISABLE_PSN
|
||||
app.GetCommerce()->CheckForTrialUpgradeKey();
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user