mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Display .7z files in file listings. Can't decompress them though.
This commit is contained in:
@@ -193,6 +193,8 @@ IdentifiedFileType Identify_File(std::string &filename)
|
||||
return FILETYPE_ARCHIVE_RAR;
|
||||
} else if (!strcasecmp(extension.c_str(),".r01")) {
|
||||
return FILETYPE_ARCHIVE_RAR;
|
||||
} else if (!strcasecmp(extension.substr(1).c_str(), ".7z")) {
|
||||
return FILETYPE_ARCHIVE_7Z;
|
||||
}
|
||||
return FILETYPE_UNKNOWN;
|
||||
}
|
||||
@@ -268,6 +270,14 @@ bool LoadFile(std::string &filename, std::string *error_string) {
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FILETYPE_ARCHIVE_7Z:
|
||||
#ifdef WIN32
|
||||
*error_string = "7z file detected (Require 7-Zip)";
|
||||
#else
|
||||
*error_string = "7z file detected (Require 7-Zip)";
|
||||
#endif
|
||||
break;
|
||||
|
||||
case FILETYPE_ISO_MODE2:
|
||||
*error_string = "PSX game image detected.";
|
||||
break;
|
||||
|
||||
@@ -37,6 +37,7 @@ enum IdentifiedFileType {
|
||||
// Try to reduce support emails...
|
||||
FILETYPE_ARCHIVE_RAR,
|
||||
FILETYPE_ARCHIVE_ZIP,
|
||||
FILETYPE_ARCHIVE_7Z,
|
||||
FILETYPE_PSP_PS1_PBP,
|
||||
FILETYPE_ISO_MODE2,
|
||||
|
||||
|
||||
@@ -445,6 +445,21 @@ handleELF:
|
||||
}
|
||||
break;
|
||||
|
||||
case FILETYPE_ARCHIVE_7Z:
|
||||
info_->paramSFOLoaded = true;
|
||||
{
|
||||
// Read standard icon
|
||||
size_t sz;
|
||||
uint8_t *contents = VFSReadFile("7z.png", &sz);
|
||||
if (contents) {
|
||||
lock_guard lock(info_->lock);
|
||||
info_->iconTextureData = std::string((const char *)contents, sz);
|
||||
info_->iconDataLoaded = true;
|
||||
}
|
||||
delete[] contents;
|
||||
}
|
||||
break;
|
||||
|
||||
case FILETYPE_NORMAL_DIRECTORY:
|
||||
default:
|
||||
info_->paramSFOLoaded = true;
|
||||
|
||||
+1
-1
@@ -550,7 +550,7 @@ void GameBrowser::Refresh() {
|
||||
// to a flood of support email...
|
||||
if (allowBrowsing_) {
|
||||
fileInfo.clear();
|
||||
path_.GetListing(fileInfo, "zip:rar:r01:");
|
||||
path_.GetListing(fileInfo, "zip:rar:r01:7z:");
|
||||
if (!fileInfo.empty()) {
|
||||
UI::LinearLayout *zl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
zl->SetSpacing(4.0f);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
+1
-1
Submodule lang updated: 0644f2d429...e86e58ff66
+1
-1
Submodule native updated: faca4e72ec...428f338f28
Binary file not shown.
Reference in New Issue
Block a user