[Project64] Fix up warning in RomBrowserClass.cpp
This commit is contained in:
parent
06653d326a
commit
5d66d688b3
|
@ -153,7 +153,6 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
|
||||||
}
|
}
|
||||||
LastTestPos = NewTestPos;
|
LastTestPos = NewTestPos;
|
||||||
|
|
||||||
LVITEMW lvItem;
|
|
||||||
memset(&lvItem, 0, sizeof(lvItem));
|
memset(&lvItem, 0, sizeof(lvItem));
|
||||||
lvItem.mask = LVIF_PARAM;
|
lvItem.mask = LVIF_PARAM;
|
||||||
lvItem.iItem = NewTestPos;
|
lvItem.iItem = NewTestPos;
|
||||||
|
@ -162,7 +161,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
|
||||||
return End;
|
return End;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Result = RomList_CompareItems(lParam, lvItem.lParam, (uint32_t)&SortFieldInfo);
|
Result = RomList_CompareItems(lParam, lvItem.lParam, (uint32_t)&SortFieldInfo);
|
||||||
if (Result <= 0)
|
if (Result <= 0)
|
||||||
{
|
{
|
||||||
if (Right == NewTestPos)
|
if (Right == NewTestPos)
|
||||||
|
@ -190,13 +189,12 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam)
|
||||||
}
|
}
|
||||||
LastTestPos = NewTestPos;
|
LastTestPos = NewTestPos;
|
||||||
|
|
||||||
LVITEMW lvItem;
|
|
||||||
memset(&lvItem, 0, sizeof(lvItem));
|
memset(&lvItem, 0, sizeof(lvItem));
|
||||||
lvItem.mask = LVIF_PARAM;
|
lvItem.mask = LVIF_PARAM;
|
||||||
lvItem.iItem = NewTestPos;
|
lvItem.iItem = NewTestPos;
|
||||||
if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return End; }
|
if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return End; }
|
||||||
|
|
||||||
int32_t Result = RomList_CompareItems(lParam, lvItem.lParam, (uint32_t)&SortFieldInfo);
|
Result = RomList_CompareItems(lParam, lvItem.lParam, (uint32_t)&SortFieldInfo);
|
||||||
if (Result >= 0)
|
if (Result >= 0)
|
||||||
{
|
{
|
||||||
if (Left == NewTestPos)
|
if (Left == NewTestPos)
|
||||||
|
@ -386,7 +384,7 @@ void CRomBrowser::MenuSetText(HMENU hMenu, int32_t MenuPos, const wchar_t * Titl
|
||||||
GetMenuItemInfoW(hMenu, MenuPos, TRUE, &MenuInfo);
|
GetMenuItemInfoW(hMenu, MenuPos, TRUE, &MenuInfo);
|
||||||
wcscpy(String, Title);
|
wcscpy(String, Title);
|
||||||
if (wcschr(String, '\t') != NULL) { *(wcschr(String, '\t')) = '\0'; }
|
if (wcschr(String, '\t') != NULL) { *(wcschr(String, '\t')) = '\0'; }
|
||||||
if (ShortCut) { swprintf(String, sizeof(String) / sizeof(String[0]), L"%s\t%s", String, ShortCut); }
|
if (ShortCut) { swprintf(String, sizeof(String) / sizeof(String[0]), L"%s\t%s", String, stdstr(ShortCut).ToUTF16().c_str()); }
|
||||||
SetMenuItemInfoW(hMenu, MenuPos, TRUE, &MenuInfo);
|
SetMenuItemInfoW(hMenu, MenuPos, TRUE, &MenuInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,15 +729,15 @@ void CRomBrowser::RomList_GetDispInfo(uint32_t pnmh)
|
||||||
}
|
}
|
||||||
else if (pRomInfo->CicChip == CIC_NUS_8303)
|
else if (pRomInfo->CicChip == CIC_NUS_8303)
|
||||||
{
|
{
|
||||||
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-8303", pRomInfo->CicChip);
|
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-8303");
|
||||||
}
|
}
|
||||||
else if (pRomInfo->CicChip == CIC_NUS_5167)
|
else if (pRomInfo->CicChip == CIC_NUS_5167)
|
||||||
{
|
{
|
||||||
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-5167", pRomInfo->CicChip);
|
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-5167");
|
||||||
}
|
}
|
||||||
else if (pRomInfo->CicChip == CIC_NUS_DDUS)
|
else if (pRomInfo->CicChip == CIC_NUS_DDUS)
|
||||||
{
|
{
|
||||||
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-????", pRomInfo->CicChip);
|
swprintf(lpdi->item.pszText, lpdi->item.cchTextMax / sizeof(wchar_t), L"CIC-NUS-????");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue