Fix 7zip loading
This commit is contained in:
parent
4854a03fda
commit
a366645fb4
|
@ -26,7 +26,6 @@ public:
|
|||
|
||||
inline int NumFiles ( void ) const { return m_db ? m_db->db.NumFiles : 0; }
|
||||
inline CSzFileItem * FileItem ( int index ) const { return m_db ? &m_db->db.Files[index] : NULL; }
|
||||
//inline CSzFileItem * FileItem ( int index ) const { return m_db ? &m_db->db.Files[index] : NULL; }
|
||||
inline int FileSize ( void ) const { return m_FileSize; }
|
||||
inline bool OpenSuccess ( void) const { return m_Opened; }
|
||||
|
||||
|
|
|
@ -293,15 +293,14 @@ bool CN64Rom::LoadN64Image ( const char * FileLoc, bool LoadBootCodeOnly ) {
|
|||
|
||||
C7zip ZipFile(FullPath);
|
||||
ZipFile.SetNotificationCallback((C7zip::LP7ZNOTIFICATION)NotificationCB,this);
|
||||
#ifdef tofix
|
||||
for (int i = 0; i < ZipFile.NumFiles(); i++)
|
||||
{
|
||||
CFileItem * f = ZipFile.FileItem(i);
|
||||
if (f->IsDirectory)
|
||||
CSzFileItem * f = ZipFile.FileItem(i);
|
||||
if (f->IsDir)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (_stricmp(f->Name, SubFile) != 0)
|
||||
if (_stricmp(ZipFile.FileNameIndex(i).c_str(), SubFile) != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -352,7 +351,6 @@ bool CN64Rom::LoadN64Image ( const char * FileLoc, bool LoadBootCodeOnly ) {
|
|||
SetError(MSG_7Z_FILE_NOT_FOUND);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//Try to open the file as a zip file
|
||||
|
|
|
@ -1341,7 +1341,7 @@ void CRomBrowser::RomList_GetDispInfo(DWORD pnmh) {
|
|||
break;
|
||||
default: strncpy(lpdi->item.pszText, " ", lpdi->item.cchTextMax);
|
||||
}
|
||||
if (strlen(lpdi->item.pszText) == 0) { strcpy(lpdi->item.pszText," "); }
|
||||
if (lpdi->item.pszText == NULL || strlen(lpdi->item.pszText) == 0) { strcpy(lpdi->item.pszText, " "); }
|
||||
}
|
||||
|
||||
void CRomBrowser::RomList_OpenRom(DWORD /*pnmh*/) {
|
||||
|
|
Loading…
Reference in New Issue