forked from cafeberry/cafeberry
fix: save space indicator & windows64 image scaling
This commit is contained in:
1 parent
b737c3eccb
commit
df2a4d85ef
2 files changed
+10
-5
No files matched your search
@@ -1399,7 +1399,7 @@ GDrawTexture * RADLINK UIController::TextureSubstitutionCreateCallback ( void *
|
|||||||
|
|
||||||
// 4J Stu - All our flash controls that allow replacing textures use a special 64x64 symbol
|
// 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
|
// 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;
|
*width = 96;
|
||||||
*height = 96;
|
*height = 96;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -636,15 +636,20 @@ void UIScene_LoadOrJoinMenu::tick()
|
|||||||
#elif defined(_WINDOWS64)
|
#elif defined(_WINDOWS64)
|
||||||
ZeroMemory(m_saveDetails[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH);
|
ZeroMemory(m_saveDetails[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH);
|
||||||
memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
|
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;
|
DWORD fileSize = 0;
|
||||||
WIN32_FIND_DATAW findData;
|
WIN32_FIND_DATAW findData;
|
||||||
HANDLE hFile = FindFirstFileW(filePath.c_str(), &findData);
|
HANDLE hFile = FindFirstFileW(folderPath.c_str(), &findData);
|
||||||
|
|
||||||
if (hFile != INVALID_HANDLE_VALUE) {
|
if (hFile != INVALID_HANDLE_VALUE) {
|
||||||
if (findData.nFileSizeHigh == 0 && findData.nFileSizeLow >= 12)
|
do {
|
||||||
fileSize = findData.nFileSizeLow;
|
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||||
|
{
|
||||||
|
fileSize = findData.nFileSizeLow;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (FindNextFileW(hFile, &findData));
|
||||||
FindClose(hFile);
|
FindClose(hFile);
|
||||||
}
|
}
|
||||||
m_spaceIndicatorSaves.addSave(fileSize);
|
m_spaceIndicatorSaves.addSave(fileSize);
|
||||||
|
|||||||
Reference in new issue
Block a user