feat: Orbis & PSVita builds, Durango postbuild & More (#10)
This fixes Orbis & PSVita builds along with adds a Durango postbuild and moves PS3 to the new SonyLeaderboardManager introduced in TU19 This also fixes the Orbis strings and gets some of the other Windows64 build configurations mostly building. --------- Co-authored-by: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Co-authored-by: str1k3r <1+str1k3r@noreply.localhost> Co-authored-by: 552eden <552eden@gmail.com> Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost> Co-authored-by: str1k3r <15+str1k3r@noreply.neolegacy.dev> Co-authored-by: pieeebot <10+pieeebot@noreply.neolegacy.dev> Reviewed-on: #10
This commit was merged in pull request #10.
This commit is contained in:
@@ -44,9 +44,11 @@ bool SonyCommerce_Orbis::m_bLicenseChecked=false; // Check the trial/
|
||||
|
||||
|
||||
|
||||
#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70
|
||||
sce::Toolkit::NP::Utilities::Future<std::vector<sce::Toolkit::NP::ProductInfo> > g_productList;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::CategoryInfo> g_categoryInfo;
|
||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::ProductInfoDetailed> g_detailedProductInfo;
|
||||
#endif
|
||||
|
||||
|
||||
SonyCommerce_Orbis::ProductInfoDetailed s_trialUpgradeProductInfoDetailed;
|
||||
@@ -180,8 +182,15 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
|
||||
params.serviceLabel = 0;
|
||||
app.DebugPrintf("Getting Product List ...\n");
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getProductList requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getProductList stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getProductList(&g_productList, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::getProductList() error. ret = 0x%x\n", ret);
|
||||
return ret;
|
||||
@@ -192,7 +201,8 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyProductList(productList, g_productList.get());
|
||||
m_event = e_event_commerceGotProductList;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -241,19 +251,27 @@ int SonyCommerce_Orbis::getCategoryInfo(CategoryInfo *pInfo, char *categoryId)
|
||||
|
||||
app.DebugPrintf("Getting Category Information...\n");
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getCategoryInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getCategoryInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getCategoryInfo(&g_categoryInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
// error
|
||||
app.DebugPrintf("Commerce::Interface::getCategoryInfo error: 0x%x\n", ret);
|
||||
return ret;
|
||||
}
|
||||
else if (g_categoryInfo.hasResult())
|
||||
else if (g_categoryInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyCategoryInfo(pInfo, g_categoryInfo.get());
|
||||
m_event = e_event_commerceGotCategoryInfo;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -289,20 +307,28 @@ int SonyCommerce_Orbis::getDetailedProductInfo(ProductInfoDetailed *pInfo, const
|
||||
strcpy(params.productId, productId);
|
||||
|
||||
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("getDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::getDetailedProductInfo() error. ret = 0x%x\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyDetailedProductInfo(pInfo, g_detailedProductInfo.get());
|
||||
m_event = e_event_commerceGotDetailedProductInfo;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -339,19 +365,27 @@ int SonyCommerce_Orbis::addDetailedProductInfo(ProductInfo *pInfo, const char *p
|
||||
strcpy(params.productId, productId);
|
||||
|
||||
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
app.DebugPrintf("Getting Detailed Product Information ... \n");
|
||||
#ifdef __ORBIS__
|
||||
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
|
||||
// report failure so the commerce flow errors out and runs the callback
|
||||
app.DebugPrintf("addDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
ORBIS_STUBBED;
|
||||
ret = -1;
|
||||
#else
|
||||
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
|
||||
if (ret < 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
app.DebugPrintf("CommerceInterface::addDetailedProductInfo() error. ret = 0x%x\n", ret);
|
||||
}
|
||||
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
if (g_detailedProductInfo.hasResult())
|
||||
{
|
||||
// result has returned immediately (don't think this should happen, but was handled in the samples
|
||||
copyAddDetailedProductInfo(pInfo, g_detailedProductInfo.get());
|
||||
m_event = e_event_commerceAddedDetailedProductInfo;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -600,7 +634,7 @@ int SonyCommerce_Orbis::createSession()
|
||||
//
|
||||
// sce::Toolkit::NP::Commerce::Interface::CreateSession
|
||||
//
|
||||
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3 platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
// This function is provided to maintain compatibility with the PlayStation�Vita and PlayStation�3 platforms. Because commerce on the PlayStation�4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
|
||||
int ret = sce::Toolkit::NP::Commerce::Interface::createSession();
|
||||
|
||||
@@ -656,7 +690,12 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
}
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotCategoryInfo:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotCategoryInfo stubbed (no Future in SDK 1.70)\n");
|
||||
#else
|
||||
copyCategoryInfo(m_pCategoryInfo, g_categoryInfo.get());
|
||||
#endif
|
||||
m_pCategoryInfo = NULL;
|
||||
m_event = e_event_commerceGotCategoryInfo;
|
||||
break;
|
||||
@@ -664,7 +703,12 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotProductList:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotProductList stubbed (no Future in SDK 1.70)\n");
|
||||
#else
|
||||
copyProductList(m_pProductInfoList, g_productList.get());
|
||||
#endif
|
||||
m_pProductInfoDetailed = NULL;
|
||||
m_event = e_event_commerceGotProductList;
|
||||
break;
|
||||
@@ -672,6 +716,12 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
|
||||
case sce::Toolkit::NP::Event::UserEvent::commerceGotDetailedProductInfo:
|
||||
{
|
||||
#ifdef __ORBIS__
|
||||
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
|
||||
app.DebugPrintf("commerceGotDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
|
||||
m_pProductInfoDetailed = NULL;
|
||||
m_pProductInfo = NULL;
|
||||
#else
|
||||
if(m_pProductInfoDetailed)
|
||||
{
|
||||
copyDetailedProductInfo(m_pProductInfoDetailed, g_detailedProductInfo.get());
|
||||
@@ -682,6 +732,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
|
||||
copyAddDetailedProductInfo(m_pProductInfo, g_detailedProductInfo.get());
|
||||
m_pProductInfo = NULL;
|
||||
}
|
||||
#endif
|
||||
m_event = e_event_commerceGotDetailedProductInfo;
|
||||
break;
|
||||
}
|
||||
@@ -1145,8 +1196,8 @@ void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, LPVOID lpParam )
|
||||
setCallback(cb,lpParam);
|
||||
|
||||
// We don't need to create a session on PS4, from the Sony docs -
|
||||
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3
|
||||
// platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
// This function is provided to maintain compatibility with the PlayStation�Vita and PlayStation�3
|
||||
// platforms. Because commerce on the PlayStation�4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user