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
71 lines
1.8 KiB
C++
71 lines
1.8 KiB
C++
#include "stdafx.h"
|
|
|
|
#include "PS3LeaderboardManager.h"
|
|
|
|
#include "PS3\PS3_App.h"
|
|
#include "PS3\PS3Extras\ShutdownManager.h"
|
|
|
|
#include "Common\Consoles_App.h"
|
|
#include "Common\Network\Sony\SQRNetworkManager.h"
|
|
|
|
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <np.h>
|
|
|
|
LeaderboardManager *LeaderboardManager::m_instance = new PS3LeaderboardManager(); //Singleton instance of the LeaderboardManager
|
|
|
|
PS3LeaderboardManager::PS3LeaderboardManager() : SonyLeaderboardManager() {}
|
|
|
|
HRESULT PS3LeaderboardManager::initialiseScoreUtility()
|
|
{
|
|
return sceNpScoreInit();
|
|
}
|
|
|
|
bool PS3LeaderboardManager::scoreUtilityAlreadyInitialised(HRESULT hr)
|
|
{
|
|
return hr == SCE_NP_COMMUNITY_ERROR_ALREADY_INITIALIZED;
|
|
}
|
|
|
|
HRESULT PS3LeaderboardManager::createTitleContext(const SceNpId &npId)
|
|
{
|
|
return sceNpScoreCreateTitleCtx(&s_npCommunicationId, &s_npCommunicationPassphrase, &npId);
|
|
}
|
|
|
|
HRESULT PS3LeaderboardManager::destroyTitleContext(int titleContext)
|
|
{
|
|
return sceNpScoreDestroyTitleCtx(titleContext);
|
|
}
|
|
|
|
HRESULT PS3LeaderboardManager::createTransactionContext(int titleContext)
|
|
{
|
|
return sceNpLookupCreateTransactionCtx(titleContext);
|
|
}
|
|
|
|
HRESULT PS3LeaderboardManager::abortTransactionContext(int transactionContext)
|
|
{
|
|
return sceNpScoreAbortTransaction(transactionContext);
|
|
}
|
|
|
|
HRESULT PS3LeaderboardManager::destroyTransactionContext(int transactionContext)
|
|
{
|
|
return sceNpScoreDestroyTransactionCtx(transactionContext);
|
|
}
|
|
|
|
HRESULT PS3LeaderboardManager::getFriendsList(const SceNpId &myNpId, SceNpId* &npIds, uint32_t &len)
|
|
{
|
|
EFilterMode filterMode = m_eFilterMode;
|
|
m_eFilterMode = eFM_Friends;
|
|
|
|
HRESULT ret = fillByIdsQuery(myNpId, npIds, len);
|
|
|
|
m_eFilterMode = filterMode;
|
|
|
|
return ret;
|
|
}
|
|
|
|
char *PS3LeaderboardManager::getComment(SceNpScoreComment *comment)
|
|
{
|
|
return comment->data;
|
|
} |