From 76ec1b4ebb70e90620b9f40960d7d5739edae571 Mon Sep 17 00:00:00 2001 From: Lithium64 Date: Sun, 1 Mar 2015 02:55:12 -0300 Subject: [PATCH 1/2] Fixed StarCraft 64 (G) (Beta) status --- Config/Project64.rdb | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/Project64.rdb b/Config/Project64.rdb index f49915709..66560d8ac 100644 --- a/Config/Project64.rdb +++ b/Config/Project64.rdb @@ -6104,6 +6104,7 @@ Self Texture=0 [FD6907F0-83CBC160-C:44] Good Name=StarCraft 64 (G) (Beta) Internal Name=STARCRAFT 64 +Status=Compatible Clear Frame=2 Culling=1 Emulate Clear=0 From a366645fb40d45667263be41a66a122c4fc8ac42 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sun, 1 Mar 2015 20:32:42 +1100 Subject: [PATCH 2/2] Fix 7zip loading --- Source/Project64/3rd Party/7zip.h | 1 - Source/Project64/N64 System/N64 Rom Class.cpp | 8 +++----- Source/Project64/User Interface/Rom Browser Class.cpp | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/Project64/3rd Party/7zip.h b/Source/Project64/3rd Party/7zip.h index 152beb35b..4b79aa5cc 100644 --- a/Source/Project64/3rd Party/7zip.h +++ b/Source/Project64/3rd Party/7zip.h @@ -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; } diff --git a/Source/Project64/N64 System/N64 Rom Class.cpp b/Source/Project64/N64 System/N64 Rom Class.cpp index dc99bf8a5..53e2e9e01 100644 --- a/Source/Project64/N64 System/N64 Rom Class.cpp +++ b/Source/Project64/N64 System/N64 Rom Class.cpp @@ -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 diff --git a/Source/Project64/User Interface/Rom Browser Class.cpp b/Source/Project64/User Interface/Rom Browser Class.cpp index 9e1f82ef9..973e2b818 100644 --- a/Source/Project64/User Interface/Rom Browser Class.cpp +++ b/Source/Project64/User Interface/Rom Browser Class.cpp @@ -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*/) {