replace all windows api types
This commit is contained in:
@@ -546,8 +546,8 @@ bool CPlatformNetworkManagerSony::isSystemPrimaryPlayer(SQRNetworkPlayer *pSQRPl
|
||||
void CPlatformNetworkManagerSony::DoWork()
|
||||
{
|
||||
#if 0
|
||||
DWORD dwNotifyId;
|
||||
ULONG_PTR ulpNotifyParam;
|
||||
unsigned long dwNotifyId;
|
||||
uintptr_t ulpNotifyParam;
|
||||
|
||||
while( XNotifyGetNext(
|
||||
m_notificationListener,
|
||||
@@ -648,7 +648,7 @@ bool CPlatformNetworkManagerSony::RemoveLocalPlayerByUserIndex( int userIndex )
|
||||
bool CPlatformNetworkManagerSony::IsInStatsEnabledSession()
|
||||
{
|
||||
#if 0
|
||||
DWORD dataSize = sizeof(QNET_LIVE_STATS_MODE);
|
||||
unsigned long dataSize = sizeof(QNET_LIVE_STATS_MODE);
|
||||
QNET_LIVE_STATS_MODE statsMode;
|
||||
m_pIQNet->GetOpt(QNET_OPTION_LIVE_STATS_MODE, &statsMode , &dataSize );
|
||||
|
||||
@@ -665,18 +665,18 @@ bool CPlatformNetworkManagerSony::SessionHasSpace(unsigned int spaceRequired /*=
|
||||
#if 0
|
||||
// This function is used while a session is running, so all players trying to join
|
||||
// should use public slots,
|
||||
DWORD publicSlots = 0;
|
||||
DWORD filledPublicSlots = 0;
|
||||
DWORD privateSlots = 0;
|
||||
DWORD filledPrivateSlots = 0;
|
||||
unsigned long publicSlots = 0;
|
||||
unsigned long filledPublicSlots = 0;
|
||||
unsigned long privateSlots = 0;
|
||||
unsigned long filledPrivateSlots = 0;
|
||||
|
||||
DWORD dataSize = sizeof(DWORD);
|
||||
unsigned long dataSize = sizeof(unsigned long);
|
||||
m_pIQNet->GetOpt(QNET_OPTION_TOTAL_PUBLIC_SLOTS, &publicSlots, &dataSize );
|
||||
m_pIQNet->GetOpt(QNET_OPTION_FILLED_PUBLIC_SLOTS, &filledPublicSlots, &dataSize );
|
||||
m_pIQNet->GetOpt(QNET_OPTION_TOTAL_PRIVATE_SLOTS, &privateSlots, &dataSize );
|
||||
m_pIQNet->GetOpt(QNET_OPTION_FILLED_PRIVATE_SLOTS, &filledPrivateSlots, &dataSize );
|
||||
|
||||
DWORD spaceLeft = (publicSlots - filledPublicSlots) + (privateSlots - filledPrivateSlots);
|
||||
unsigned long spaceLeft = (publicSlots - filledPublicSlots) + (privateSlots - filledPrivateSlots);
|
||||
|
||||
return spaceLeft >= spaceRequired;
|
||||
#else
|
||||
@@ -712,7 +712,7 @@ bool CPlatformNetworkManagerSony::LeaveGame(bool bMigrateHost)
|
||||
if( socket != NULL )
|
||||
{
|
||||
//printf("Waiting for socket closed event\n");
|
||||
DWORD result = socket->m_socketClosedEvent->WaitForSignal(INFINITE);
|
||||
unsigned long result = socket->m_socketClosedEvent->WaitForSignal(INFINITE);
|
||||
|
||||
// The session might be gone once the socket releases
|
||||
if( IsInSession() )
|
||||
@@ -794,12 +794,12 @@ bool CPlatformNetworkManagerSony::_StartGame()
|
||||
{
|
||||
#if 0
|
||||
// Set the options that now allow players to join this game
|
||||
BOOL enableJip = true; // Must always be true othewise nobody can join the game while in the PLAY state
|
||||
m_pIQNet->SetOpt( QNET_OPTION_JOIN_IN_PROGRESS_ALLOWED, &enableJip, sizeof BOOL );
|
||||
BOOL enableInv = !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_INVITES_ALLOWED, &enableInv, sizeof BOOL );
|
||||
BOOL enablePres = !IsPrivateGame() && !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_PRESENCE_JOIN_MODE, &enablePres, sizeof BOOL );
|
||||
bool enableJip = true; // Must always be true othewise nobody can join the game while in the PLAY state
|
||||
m_pIQNet->SetOpt( QNET_OPTION_JOIN_IN_PROGRESS_ALLOWED, &enableJip, sizeof bool );
|
||||
bool enableInv = !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_INVITES_ALLOWED, &enableInv, sizeof bool );
|
||||
bool enablePres = !IsPrivateGame() && !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_PRESENCE_JOIN_MODE, &enablePres, sizeof bool );
|
||||
|
||||
return ( m_pIQNet->StartGame() == S_OK );
|
||||
#else
|
||||
@@ -896,16 +896,16 @@ bool CPlatformNetworkManagerSony::_RunNetworkGame()
|
||||
#if 0
|
||||
// We delay actually starting the session so that we know the game server is running by the time the clients try to join
|
||||
// This does result in a host advantage
|
||||
HRESULT hr = m_pIQNet->StartGame();
|
||||
int hr = m_pIQNet->StartGame();
|
||||
if(FAILED(hr)) return false;
|
||||
|
||||
// Set the options that now allow players to join this game
|
||||
BOOL enableJip = true; // Must always be true othewise nobody can join the game while in the PLAY state
|
||||
m_pIQNet->SetOpt( QNET_OPTION_JOIN_IN_PROGRESS_ALLOWED, &enableJip, sizeof BOOL );
|
||||
BOOL enableInv = !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_INVITES_ALLOWED, &enableInv, sizeof BOOL );
|
||||
BOOL enablePres = !IsPrivateGame() && !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_PRESENCE_JOIN_MODE, &enablePres, sizeof BOOL );
|
||||
bool enableJip = true; // Must always be true othewise nobody can join the game while in the PLAY state
|
||||
m_pIQNet->SetOpt( QNET_OPTION_JOIN_IN_PROGRESS_ALLOWED, &enableJip, sizeof bool );
|
||||
bool enableInv = !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_INVITES_ALLOWED, &enableInv, sizeof bool );
|
||||
bool enablePres = !IsPrivateGame() && !IsLocalGame();
|
||||
m_pIQNet->SetOpt( QNET_OPTION_PRESENCE_JOIN_MODE, &enablePres, sizeof bool );
|
||||
#endif
|
||||
if( IsHost() )
|
||||
{
|
||||
@@ -1177,7 +1177,7 @@ vector<FriendSessionInfo *> *CPlatformNetworkManagerSony::GetSessionList(int iPa
|
||||
bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID sessionId, FriendSessionInfo *foundSessionInfo)
|
||||
{
|
||||
#if 0
|
||||
HRESULT hr = E_FAIL;
|
||||
int hr = E_FAIL;
|
||||
|
||||
const XSESSION_SEARCHRESULT *pSearchResult;
|
||||
const XNQOSINFO * pxnqi;
|
||||
@@ -1185,7 +1185,7 @@ bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID session
|
||||
if( m_currentSearchResultsCount[iPad] > 0 )
|
||||
{
|
||||
// Loop through all the results.
|
||||
for( DWORD dwResult = 0; dwResult < m_currentSearchResultsCount[iPad]; dwResult++ )
|
||||
for( unsigned long dwResult = 0; dwResult < m_currentSearchResultsCount[iPad]; dwResult++ )
|
||||
{
|
||||
pSearchResult = &m_pCurrentSearchResults[iPad]->pResults[dwResult];
|
||||
|
||||
@@ -1254,7 +1254,7 @@ bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID session
|
||||
#endif
|
||||
}
|
||||
|
||||
void CPlatformNetworkManagerSony::SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam )
|
||||
void CPlatformNetworkManagerSony::SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(void* pParam), void* pSearchParam )
|
||||
{
|
||||
m_SessionsUpdatedCallback = SessionsUpdatedCallback; m_pSearchParam = pSearchParam;
|
||||
}
|
||||
@@ -1276,7 +1276,7 @@ void CPlatformNetworkManagerSony::ForceFriendsSessionRefresh()
|
||||
INetworkPlayer *CPlatformNetworkManagerSony::addNetworkPlayer(SQRNetworkPlayer *pSQRPlayer)
|
||||
{
|
||||
NetworkPlayerSony *pNetworkPlayer = new NetworkPlayerSony(pSQRPlayer);
|
||||
pSQRPlayer->SetCustomDataValue((ULONG_PTR)pNetworkPlayer);
|
||||
pSQRPlayer->SetCustomDataValue((uintptr_t)pNetworkPlayer);
|
||||
currentNetworkPlayers.push_back( pNetworkPlayer );
|
||||
return pNetworkPlayer;
|
||||
}
|
||||
@@ -1345,7 +1345,7 @@ void CPlatformNetworkManagerSony::SetSessionSubTexturePackId( int id )
|
||||
m_hostGameSessionData.subTexturePackId = id;
|
||||
}
|
||||
|
||||
void CPlatformNetworkManagerSony::Notify(int ID, ULONG_PTR Param)
|
||||
void CPlatformNetworkManagerSony::Notify(int ID, uintptr_t Param)
|
||||
{
|
||||
#if 0
|
||||
m_pSQRNet->Notify( ID, Param );
|
||||
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
#endif
|
||||
SQRNetworkManager * m_pSQRNet; // pointer to SQRNetworkManager interface
|
||||
|
||||
HANDLE m_notificationListener;
|
||||
void* m_notificationListener;
|
||||
|
||||
vector<SQRNetworkPlayer *> m_machineSQRPrimaryPlayers; // collection of players that we deem to be the main one for that system
|
||||
|
||||
@@ -149,8 +149,8 @@ private:
|
||||
|
||||
int m_lastSearchPad;
|
||||
bool m_bSearchPending;
|
||||
LPVOID m_pSearchParam;
|
||||
void (*m_SessionsUpdatedCallback)(LPVOID pParam);
|
||||
void* m_pSearchParam;
|
||||
void (*m_SessionsUpdatedCallback)(void* pParam);
|
||||
|
||||
C4JThread* m_SearchingThread;
|
||||
|
||||
@@ -163,12 +163,12 @@ private:
|
||||
|
||||
virtual void SetSessionTexturePackParentId( int id );
|
||||
virtual void SetSessionSubTexturePackId( int id );
|
||||
virtual void Notify(int ID, ULONG_PTR Param);
|
||||
virtual void Notify(int ID, uintptr_t Param);
|
||||
|
||||
public:
|
||||
virtual vector<FriendSessionInfo *> *GetSessionList(int iPad, int localPlayers, bool partyOnly);
|
||||
virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession);
|
||||
virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam );
|
||||
virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(void* pParam), void* pSearchParam );
|
||||
virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );
|
||||
virtual void ForceFriendsSessionRefresh();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ bool SonyCommerce::m_bCommerceInitialised = false;
|
||||
SceNpCommerce2SessionInfo SonyCommerce::m_sessionInfo;
|
||||
SonyCommerce::State SonyCommerce::m_state = e_state_noSession;
|
||||
int SonyCommerce::m_errorCode = 0;
|
||||
LPVOID SonyCommerce::m_callbackParam = NULL;
|
||||
void* SonyCommerce::m_callbackParam = NULL;
|
||||
|
||||
void* SonyCommerce::m_receiveBuffer = NULL;
|
||||
SonyCommerce::Event SonyCommerce::m_event;
|
||||
@@ -29,7 +29,7 @@ sys_memory_container_t SonyCommerce::m_memContainer = SYS_MEMORY_CONTAINER_I
|
||||
bool SonyCommerce::m_bUpgradingTrial = false;
|
||||
|
||||
SonyCommerce::CallbackFunc SonyCommerce::m_trialUpgradeCallbackFunc;
|
||||
LPVOID SonyCommerce::m_trialUpgradeCallbackParam;
|
||||
void* SonyCommerce::m_trialUpgradeCallbackParam;
|
||||
|
||||
CRITICAL_SECTION SonyCommerce::m_queueLock;
|
||||
|
||||
@@ -81,7 +81,7 @@ void SonyCommerce::Init()
|
||||
|
||||
|
||||
|
||||
void SonyCommerce::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion)
|
||||
void SonyCommerce::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion)
|
||||
{
|
||||
ProfileManager.SetFullVersion(bFullVersion);
|
||||
if(ProfileManager.IsFullVersion())
|
||||
@@ -798,20 +798,20 @@ int SonyCommerce::downloadList(DownloadListInputParams ¶ms)
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void SonyCommerce::UpgradeTrialCallback2(LPVOID lpParam,int err)
|
||||
void SonyCommerce::UpgradeTrialCallback2(void* lpParam,int err)
|
||||
{
|
||||
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err);
|
||||
SonyCommerce::CheckForTrialUpgradeKey();
|
||||
if(err != CELL_OK)
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
C4JStorage::EMessageResult result = ui.RequestMessageBox( IDS_PRO_UNLOCKGAME_TITLE, IDS_NO_DLCOFFERS, uiIDA,1,ProfileManager.GetPrimaryPad());
|
||||
}
|
||||
m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode);
|
||||
}
|
||||
|
||||
void SonyCommerce::UpgradeTrialCallback1(LPVOID lpParam,int err)
|
||||
void SonyCommerce::UpgradeTrialCallback1(void* lpParam,int err)
|
||||
{
|
||||
|
||||
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err);
|
||||
@@ -831,7 +831,7 @@ void SonyCommerce::UpgradeTrialCallback1(LPVOID lpParam,int err)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
C4JStorage::EMessageResult result = ui.RequestMessageBox( IDS_PRO_UNLOCKGAME_TITLE, IDS_NO_DLCOFFERS, uiIDA,1,ProfileManager.GetPrimaryPad());
|
||||
m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode);
|
||||
@@ -847,7 +847,7 @@ void SonyCommerce_UpgradeTrial()
|
||||
app.UpgradeTrial();
|
||||
}
|
||||
|
||||
void SonyCommerce::UpgradeTrial(CallbackFunc cb, LPVOID lpParam)
|
||||
void SonyCommerce::UpgradeTrial(CallbackFunc cb, void* lpParam)
|
||||
{
|
||||
m_trialUpgradeCallbackFunc = cb;
|
||||
m_trialUpgradeCallbackParam = lpParam;
|
||||
@@ -1383,7 +1383,7 @@ int SonyCommerce::commerceEnd()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void SonyCommerce::CreateSession( CallbackFunc cb, LPVOID lpParam )
|
||||
void SonyCommerce::CreateSession( CallbackFunc cb, void* lpParam )
|
||||
{
|
||||
Init();
|
||||
EnterCriticalSection(&m_queueLock);
|
||||
@@ -1406,7 +1406,7 @@ void SonyCommerce::CloseSession()
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
void SonyCommerce::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
|
||||
void SonyCommerce::GetProductList( CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
|
||||
{
|
||||
EnterCriticalSection(&m_queueLock);
|
||||
setCallback(cb,lpParam);
|
||||
@@ -1416,7 +1416,7 @@ void SonyCommerce::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector<
|
||||
LeaveCriticalSection(&m_queueLock);
|
||||
}
|
||||
|
||||
void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
|
||||
void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
|
||||
{
|
||||
EnterCriticalSection(&m_queueLock);
|
||||
setCallback(cb,lpParam);
|
||||
@@ -1428,7 +1428,7 @@ void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, Prod
|
||||
}
|
||||
|
||||
// 4J-PB - fill out the long description and the price for the product
|
||||
void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
|
||||
void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
|
||||
{
|
||||
EnterCriticalSection(&m_queueLock);
|
||||
setCallback(cb,lpParam);
|
||||
@@ -1438,7 +1438,7 @@ void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, Prod
|
||||
m_messageQueue.push(e_message_commerceAddDetailedProductInfo);
|
||||
LeaveCriticalSection(&m_queueLock);
|
||||
}
|
||||
void SonyCommerce::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId )
|
||||
void SonyCommerce::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId )
|
||||
{
|
||||
EnterCriticalSection(&m_queueLock);
|
||||
setCallback(cb,lpParam);
|
||||
@@ -1448,7 +1448,7 @@ void SonyCommerce::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInf
|
||||
LeaveCriticalSection(&m_queueLock);
|
||||
}
|
||||
|
||||
void SonyCommerce::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID )
|
||||
void SonyCommerce::Checkout( CallbackFunc cb, void* lpParam, const char* skuID )
|
||||
{
|
||||
if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID)
|
||||
{
|
||||
@@ -1469,7 +1469,7 @@ void SonyCommerce::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID
|
||||
LeaveCriticalSection(&m_queueLock);
|
||||
}
|
||||
|
||||
void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID )
|
||||
void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID )
|
||||
{
|
||||
if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID)
|
||||
return;
|
||||
|
||||
@@ -43,7 +43,7 @@ class SonyCommerce
|
||||
{
|
||||
|
||||
public:
|
||||
typedef void (*CallbackFunc)(LPVOID lpParam, int error_code);
|
||||
typedef void (*CallbackFunc)(void* lpParam, int error_code);
|
||||
|
||||
|
||||
/// @brief
|
||||
@@ -153,20 +153,20 @@ public:
|
||||
|
||||
|
||||
public:
|
||||
virtual void CreateSession(CallbackFunc cb, LPVOID lpParam) = 0;
|
||||
virtual void CreateSession(CallbackFunc cb, void* lpParam) = 0;
|
||||
virtual void CloseSession() = 0;
|
||||
|
||||
virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId) = 0;
|
||||
virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId) = 0;
|
||||
virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId) = 0;
|
||||
virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) = 0;
|
||||
virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
|
||||
virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
|
||||
virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId) = 0;
|
||||
virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId) = 0;
|
||||
virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId) = 0;
|
||||
virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) = 0;
|
||||
virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
|
||||
virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
|
||||
#if defined(__ORBIS__) || defined( __PSVITA__)
|
||||
virtual void Checkout_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
|
||||
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
|
||||
virtual void Checkout_Game(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
|
||||
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
|
||||
#endif
|
||||
virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam) = 0;
|
||||
virtual void UpgradeTrial(CallbackFunc cb, void* lpParam) = 0;
|
||||
virtual void CheckForTrialUpgradeKey() = 0;
|
||||
virtual bool LicenseChecked() = 0;
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ static SceRemoteStorageStatus statParams;
|
||||
|
||||
|
||||
|
||||
// void remoteStorageGetCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
// void remoteStorageGetCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
// {
|
||||
// app.DebugPrintf("remoteStorageGetCallback err : 0x%08x\n");
|
||||
// }
|
||||
//
|
||||
// void remoteStorageCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
// void remoteStorageCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
// {
|
||||
// app.DebugPrintf("remoteStorageCallback err : 0x%08x\n");
|
||||
//
|
||||
@@ -40,7 +40,7 @@ static SceRemoteStorageStatus statParams;
|
||||
|
||||
|
||||
|
||||
void getSaveInfoReturnCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
void getSaveInfoReturnCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
{
|
||||
SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam;
|
||||
app.DebugPrintf("remoteStorageGetInfoCallback err : 0x%08x\n", error_code);
|
||||
@@ -65,7 +65,7 @@ void getSaveInfoReturnCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int
|
||||
|
||||
|
||||
|
||||
static void getSaveInfoInitCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
static void getSaveInfoInitCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
{
|
||||
SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam;
|
||||
if(error_code != 0)
|
||||
@@ -101,7 +101,7 @@ void SonyRemoteStorage::getSaveInfo()
|
||||
m_getInfoStatus = e_noInfoFound;
|
||||
}
|
||||
|
||||
bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb, LPVOID lpParam )
|
||||
bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb, void* lpParam )
|
||||
{
|
||||
m_startTime = System::currentTimeMillis();
|
||||
m_dataProgress = 0;
|
||||
@@ -109,7 +109,7 @@ bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb,
|
||||
}
|
||||
|
||||
|
||||
static void setSaveDataInitCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
static void setSaveDataInitCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
|
||||
{
|
||||
SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam;
|
||||
if(error_code != 0)
|
||||
@@ -161,7 +161,7 @@ ESavePlatform SonyRemoteStorage::getSavePlatform()
|
||||
|
||||
}
|
||||
|
||||
__int64 SonyRemoteStorage::getSaveSeed()
|
||||
int64_t SonyRemoteStorage::getSaveSeed()
|
||||
{
|
||||
if(m_getInfoStatus != e_infoFound)
|
||||
return 0;
|
||||
@@ -171,7 +171,7 @@ __int64 SonyRemoteStorage::getSaveSeed()
|
||||
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;
|
||||
@@ -227,7 +227,7 @@ int SonyRemoteStorage::getSaveFilesize()
|
||||
}
|
||||
|
||||
|
||||
bool SonyRemoteStorage::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam )
|
||||
bool SonyRemoteStorage::setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam )
|
||||
{
|
||||
m_setDataSaveInfo = info;
|
||||
m_callbackFunc = cb;
|
||||
@@ -238,7 +238,7 @@ bool SonyRemoteStorage::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpPara
|
||||
return true;
|
||||
}
|
||||
|
||||
int SonyRemoteStorage::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes)
|
||||
int SonyRemoteStorage::LoadSaveDataThumbnailReturned(void* lpParam,uint8_t* pbThumbnail,unsigned long dwThumbnailBytes)
|
||||
{
|
||||
SonyRemoteStorage *pClass= (SonyRemoteStorage *)lpParam;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
e_getStatusInProgress,
|
||||
e_getStatusSucceeded
|
||||
};
|
||||
typedef void (*CallbackFunc)(LPVOID lpParam, Status s, int error_code);
|
||||
typedef void (*CallbackFunc)(void* lpParam, Status s, int error_code);
|
||||
|
||||
enum GetInfoStatus
|
||||
{
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
bool saveIsAvailable();
|
||||
|
||||
int getSaveFilesize();
|
||||
bool getSaveData(const char* localDirname, CallbackFunc cb, LPVOID lpParam);
|
||||
bool getSaveData(const char* localDirname, CallbackFunc cb, void* lpParam);
|
||||
|
||||
bool setSaveData(PSAVE_INFO info, CallbackFunc cb, void* lpParam);
|
||||
bool waitingForSetData() { return (m_setDataStatus == e_settingData); }
|
||||
@@ -72,15 +72,15 @@ public:
|
||||
const char* getLocalFilename();
|
||||
const char* getSaveNameUTF8();
|
||||
ESavePlatform getSavePlatform();
|
||||
__int64 getSaveSeed();
|
||||
int64_t getSaveSeed();
|
||||
unsigned int getSaveHostOptions();
|
||||
unsigned int getSaveTexturePack();
|
||||
|
||||
void SetServiceID(char *pchServiceID) { m_pchServiceID=pchServiceID; }
|
||||
|
||||
virtual bool init(CallbackFunc cb, LPVOID lpParam) = 0;
|
||||
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam) = 0;
|
||||
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam) = 0;
|
||||
virtual bool init(CallbackFunc cb, void* lpParam) = 0;
|
||||
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam) = 0;
|
||||
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam) = 0;
|
||||
virtual void abort() = 0;
|
||||
virtual bool shutdown();
|
||||
virtual bool setDataInternal() = 0;
|
||||
@@ -93,8 +93,8 @@ public:
|
||||
|
||||
|
||||
|
||||
bool setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam );
|
||||
static int LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes);
|
||||
bool setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam );
|
||||
static int LoadSaveDataThumbnailReturned(void* lpParam,uint8_t* pbThumbnail,unsigned long dwThumbnailBytes);
|
||||
static int setDataThread(void* lpParam);
|
||||
|
||||
SonyRemoteStorage() : m_memPoolBuffer(NULL), m_bInitialised(false),m_getInfoStatus(e_noInfoFound) {}
|
||||
@@ -107,11 +107,11 @@ protected:
|
||||
int m_dataProgress;
|
||||
char *m_pchServiceID;
|
||||
|
||||
PBYTE m_thumbnailData;
|
||||
uint8_t* m_thumbnailData;
|
||||
unsigned int m_thumbnailDataSize;
|
||||
C4JThread* m_SetDataThread;
|
||||
PSAVE_INFO m_setDataSaveInfo;
|
||||
__int64 m_startTime;
|
||||
int64_t m_startTime;
|
||||
|
||||
bool m_bAborting;
|
||||
bool m_bTransferStarted;
|
||||
|
||||
Reference in New Issue
Block a user