From d63f79325f85e014361eb8cf1e41eaebedb1ae71 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:53:32 +0700 Subject: Get rid of MSVC's __int64 Use either int64_t, uint64_t or long long and unsigned long long, defined as per C++11 standard --- .../Common/Network/Sony/SonyRemoteStorage.cpp | 30 +++++++++++----------- .../Common/Network/Sony/SonyRemoteStorage.h | 10 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'Minecraft.Client/Common/Network/Sony') diff --git a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp index ccb1957d..d745fb85 100644 --- a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp +++ b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp @@ -25,11 +25,11 @@ static SceRemoteStorageStatus statParams; // { // app.DebugPrintf("remoteStorageGetCallback err : 0x%08x\n"); // } -// +// // void remoteStorageCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code) // { // app.DebugPrintf("remoteStorageCallback err : 0x%08x\n"); -// +// // app.getRemoteStorage()->getRemoteFileInfo(&statParams, remoteStorageGetInfoCallback, NULL); // } @@ -161,17 +161,17 @@ ESavePlatform SonyRemoteStorage::getSavePlatform() } -__int64 SonyRemoteStorage::getSaveSeed() +int64_t SonyRemoteStorage::getSaveSeed() { if(m_getInfoStatus != e_infoFound) return 0; DescriptionData* pDescData = (DescriptionData*)m_remoteFileInfo->fileDescription; char seedString[17]; - ZeroMemory(seedString,17); + ZeroMemory(seedString,17); memcpy(seedString, pDescData->m_seed,16); - __uint64 seed = 0; + uint64_t seed = 0; std::stringstream ss; ss << seedString; ss >> std::hex >> seed; @@ -185,7 +185,7 @@ unsigned int SonyRemoteStorage::getSaveHostOptions() DescriptionData* pDescData = (DescriptionData*)m_remoteFileInfo->fileDescription; char optionsString[9]; - ZeroMemory(optionsString,9); + ZeroMemory(optionsString,9); memcpy(optionsString, pDescData->m_hostOptions,8); unsigned int uiHostOptions = 0; @@ -202,7 +202,7 @@ unsigned int SonyRemoteStorage::getSaveTexturePack() DescriptionData* pDescData = (DescriptionData*)m_remoteFileInfo->fileDescription; char textureString[9]; - ZeroMemory(textureString,9); + ZeroMemory(textureString,9); memcpy(textureString, pDescData->m_texturePack,8); unsigned int uiTexturePack = 0; @@ -219,9 +219,9 @@ const char* SonyRemoteStorage::getRemoteSaveFilename() int SonyRemoteStorage::getSaveFilesize() { - if(m_getInfoStatus == e_infoFound) + if(m_getInfoStatus == e_infoFound) { - return m_remoteFileInfo->fileSize; + return m_remoteFileInfo->fileSize; } return 0; } @@ -284,9 +284,9 @@ bool SonyRemoteStorage::saveIsAvailable() if(m_getInfoStatus != e_infoFound) return false; #ifdef __PS3__ - return (getSavePlatform() == SAVE_FILE_PLATFORM_PSVITA); + return (getSavePlatform() == SAVE_FILE_PLATFORM_PSVITA); #elif defined __PSVITA__ - return (getSavePlatform() == SAVE_FILE_PLATFORM_PS3); + return (getSavePlatform() == SAVE_FILE_PLATFORM_PS3); #else // __ORBIS__ return true; #endif @@ -294,7 +294,7 @@ bool SonyRemoteStorage::saveIsAvailable() int SonyRemoteStorage::getDataProgress() { - __int64 time = System::currentTimeMillis(); + int64_t time = System::currentTimeMillis(); int elapsedSecs = (time - m_startTime) / 1000; int progVal = m_dataProgress + (elapsedSecs/3); if(progVal > 95) @@ -310,15 +310,15 @@ bool SonyRemoteStorage::shutdown() if(m_bInitialised) { int ret = sceRemoteStorageTerm(); - if(ret >= 0) + if(ret >= 0) { app.DebugPrintf("Term request done \n"); m_bInitialised = false; free(m_memPoolBuffer); m_memPoolBuffer = NULL; return true; - } - else + } + else { app.DebugPrintf("Error in Term request: 0x%x \n", ret); return false; diff --git a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h index f435848e..3967a109 100644 --- a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h +++ b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "..\..\Common\Network\Sony\sceRemoteStorage\header\sceRemoteStorage.h" @@ -42,7 +42,7 @@ public: SceRemoteStorageData* m_remoteFileInfo; class DescriptionData - { + { // this stuff is read from a JSON query, so it all has to be text based, max 256 bytes public: char m_platform[4]; @@ -72,7 +72,7 @@ public: const char* getLocalFilename(); const char* getSaveNameUTF8(); ESavePlatform getSavePlatform(); - __int64 getSaveSeed(); + int64_t getSaveSeed(); unsigned int getSaveHostOptions(); unsigned int getSaveTexturePack(); @@ -97,7 +97,7 @@ public: static int LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes); static int setDataThread(void* lpParam); - SonyRemoteStorage() : m_memPoolBuffer(NULL), m_bInitialised(false),m_getInfoStatus(e_noInfoFound) {} + SonyRemoteStorage() : m_memPoolBuffer(NULL), m_bInitialised(false),m_getInfoStatus(e_noInfoFound) {} protected: const char* getRemoteSaveFilename(); @@ -111,7 +111,7 @@ protected: unsigned int m_thumbnailDataSize; C4JThread* m_SetDataThread; PSAVE_INFO m_setDataSaveInfo; - __int64 m_startTime; + int64_t m_startTime; bool m_bAborting; bool m_bTransferStarted; -- cgit v1.2.3