Files
MinecraftConsoles/Minecraft.Client/PSVita/Leaderboards/PSVitaLeaderboardManager.cpp
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

64 lines
1.8 KiB
C++

#include "stdafx.h"
#include "PSVitaLeaderboardManager.h"
#include "PSVita\PSVita_App.h"
#include "PSVita\PSVitaExtras\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 PSVitaLeaderboardManager(); //Singleton instance of the LeaderboardManager
PSVitaLeaderboardManager::PSVitaLeaderboardManager() : SonyLeaderboardManager() {}
HRESULT PSVitaLeaderboardManager::initialiseScoreUtility()
{
return sceNpScoreInit( SCE_KERNEL_DEFAULT_PRIORITY_USER, SCE_KERNEL_THREAD_CPU_AFFINITY_MASK_DEFAULT, NULL);
}
bool PSVitaLeaderboardManager::scoreUtilityAlreadyInitialised(HRESULT hr)
{
return hr == SCE_NP_COMMUNITY_ERROR_ALREADY_INITIALIZED;
}
HRESULT PSVitaLeaderboardManager::createTitleContext(const SceNpId &npId)
{
return sceNpScoreCreateTitleCtx(&s_npCommunicationId, &s_npCommunicationPassphrase, &npId);
}
HRESULT PSVitaLeaderboardManager::destroyTitleContext(int titleContext)
{
return sceNpScoreDestroyTitleCtx(titleContext);
}
HRESULT PSVitaLeaderboardManager::createTransactionContext(int titleContext)
{
return sceNpScoreCreateRequest(titleContext);
}
HRESULT PSVitaLeaderboardManager::abortTransactionContext(int transactionContext)
{
return sceNpScoreAbortRequest(transactionContext);
}
HRESULT PSVitaLeaderboardManager::destroyTransactionContext(int transactionContext)
{
return sceNpScoreDeleteRequest(transactionContext);
}
HRESULT PSVitaLeaderboardManager::getFriendsList(sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> &friendsList)
{
return sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendsList, false);
}
char *PSVitaLeaderboardManager::getComment(SceNpScoreComment *comment)
{
return comment->utf8Comment;
}