forked from cafeberry/cafeberry
fix: save space indicator & windows64 image scaling
This commit is contained in:
@@ -1399,7 +1399,7 @@ GDrawTexture * RADLINK UIController::TextureSubstitutionCreateCallback ( void *
|
||||
|
||||
// 4J Stu - All our flash controls that allow replacing textures use a special 64x64 symbol
|
||||
// Force this size here so that our images don't get scaled wildly
|
||||
#if (defined __ORBIS__ || defined _DURANGO )
|
||||
#if (defined __ORBIS__ || defined _DURANGO || defined _WINDOWS64 )
|
||||
*width = 96;
|
||||
*height = 96;
|
||||
#else
|
||||
|
||||
@@ -636,15 +636,20 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
#elif defined(_WINDOWS64)
|
||||
ZeroMemory(m_saveDetails[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH);
|
||||
memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
|
||||
wstring filePath = wstring(L"Windows64\\GameHDD\\") + app.UTF8ToWide(m_saveDetails[i].UTF8SaveFilename) + wstring(L"\\saveData.ms");
|
||||
wstring folderPath = wstring(L"Windows64\\GameHDD\\") + app.UTF8ToWide(m_saveDetails[i].UTF8SaveFilename) + L"\\*";
|
||||
|
||||
DWORD fileSize = 0;
|
||||
WIN32_FIND_DATAW findData;
|
||||
HANDLE hFile = FindFirstFileW(filePath.c_str(), &findData);
|
||||
HANDLE hFile = FindFirstFileW(folderPath.c_str(), &findData);
|
||||
|
||||
if (hFile != INVALID_HANDLE_VALUE) {
|
||||
if (findData.nFileSizeHigh == 0 && findData.nFileSizeLow >= 12)
|
||||
fileSize = findData.nFileSizeLow;
|
||||
do {
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
fileSize = findData.nFileSizeLow;
|
||||
break;
|
||||
}
|
||||
} while (FindNextFileW(hFile, &findData));
|
||||
FindClose(hFile);
|
||||
}
|
||||
m_spaceIndicatorSaves.addSave(fileSize);
|
||||
|
||||
Reference in New Issue
Block a user