fix(windows64): save space indicator
This commit is contained in:
1 parent
ca003f1afa
commit
4e79d92c24
6 files changed
+56
-14
No files matched your search
@@ -111,8 +111,11 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
|
||||
m_controlJoinTimer.setVisible( true );
|
||||
|
||||
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
m_spaceIndicatorSaves.init(L"",eControl_SpaceIndicator,0, (4LL *1024LL * 1024LL * 1024LL) );
|
||||
#if defined _XBOX_ONE || __ORBIS__ || _WINDOWS64
|
||||
if(ui.getScreenWidth() >= 1920)
|
||||
{
|
||||
m_spaceIndicatorSaves.init(L"",eControl_SpaceIndicator,0, (4LL *1024LL * 1024LL * 1024LL) );
|
||||
}
|
||||
#endif
|
||||
m_bUpdateSaveSize = false;
|
||||
|
||||
@@ -158,7 +161,7 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) || defined(_DURANGO)
|
||||
#if defined __PS3__ || __ORBIS__ || __PSVITA__ || _DURANGO || _WINDOWS64
|
||||
// Always clear the saves when we enter this menu
|
||||
StorageManager.ClearSavesInfo();
|
||||
#endif
|
||||
@@ -560,7 +563,7 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
// Stop loading thumbnails if we navigate forwards
|
||||
if(hasFocus(m_iPad))
|
||||
{
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
#if defined _XBOX_ONE || __ORBIS__ || _WINDOWS64
|
||||
if(m_bUpdateSaveSize)
|
||||
{
|
||||
if((m_iDefaultButtonsC > 0) && (m_iSaveListIndex >= m_iDefaultButtonsC))
|
||||
@@ -581,8 +584,11 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
if(m_pSaveDetails!=NULL)
|
||||
{
|
||||
//CD - Fix - Adding define for ORBIS/XBOXONE
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
m_spaceIndicatorSaves.reset();
|
||||
#if defined _XBOX_ONE || __ORBIS__ || _WINDOWS64
|
||||
if(ui.getScreenWidth() >= 1920)
|
||||
{
|
||||
m_spaceIndicatorSaves.reset();
|
||||
}
|
||||
#endif
|
||||
|
||||
AddDefaultButtons();
|
||||
@@ -605,10 +611,33 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
m_iSaveDetailsCount = m_pSaveDetails->iSaveC;
|
||||
for(unsigned int i = 0; i < m_pSaveDetails->iSaveC; ++i)
|
||||
{
|
||||
#if defined(_XBOX_ONE)
|
||||
#ifdef _XBOX_ONE
|
||||
m_spaceIndicatorSaves.addSave(m_pSaveDetails->SaveInfoA[i].totalSize);
|
||||
#elif defined(__ORBIS__)
|
||||
#elif __ORBIS__
|
||||
m_spaceIndicatorSaves.addSave(m_pSaveDetails->SaveInfoA[i].blocksUsed * (32 * 1024) );
|
||||
#elif _WINDOWS64
|
||||
if(ui.getScreenWidth() >= 1920)
|
||||
{
|
||||
ZeroMemory(m_saveDetails[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH);
|
||||
memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
|
||||
wstring folderPath = wstring(L"Windows64\\GameHDD\\") + app.UTF8ToWide(m_saveDetails[i].UTF8SaveFilename) + L"\\*";
|
||||
|
||||
DWORD fileSize = 0;
|
||||
WIN32_FIND_DATAW findData;
|
||||
HANDLE hFile = FindFirstFileW(folderPath.c_str(), &findData);
|
||||
|
||||
if (hFile != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
fileSize = findData.nFileSizeLow;
|
||||
break;
|
||||
}
|
||||
} while (FindNextFileW(hFile, &findData));
|
||||
FindClose(hFile);
|
||||
}
|
||||
m_spaceIndicatorSaves.addSave(fileSize);
|
||||
}
|
||||
#endif
|
||||
#ifdef _DURANGO
|
||||
m_buttonListSaves.addItem(m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, L"");
|
||||
|
||||
Reference in new issue
Block a user