From 039054a8bdf6a6c47419ab65477c3ecbd346f3db Mon Sep 17 00:00:00 2001 From: Philippe Daouadi Date: Mon, 7 May 2018 10:50:43 +0200 Subject: [PATCH] pkgi_download: add support for minis games Closes #66 --- pkgi_download.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgi_download.cpp b/pkgi_download.cpp index b9c6c835..31000f21 100644 --- a/pkgi_download.cpp +++ b/pkgi_download.cpp @@ -265,10 +265,11 @@ int Download::download_head(const uint8_t* rif) content_type = get32be(head + offset + 8); // 6 PSX game // 7 PSP game + // 15 PSP-Mini game // 21 PSV game (or update) // 22 PSV DLC if (content_type != 21 && content_type != 22 && content_type != 6 && - content_type != 7) + content_type != 7 && content_type != 15) { throw DownloadError( "unsupported package type: " + @@ -391,7 +392,7 @@ int Download::download_files(void) item_size, type); - if (content_type == 6 || content_type == 7) + if (content_type == 6 || content_type == 7 || content_type == 15) { if (std::string(item_name) == "USRDIR/CONTENT/DOCUMENT.DAT") pkgi_snprintf( @@ -622,7 +623,7 @@ int Download::pkgi_download( return 0; if (!download_tail()) return 0; - if (content_type != 6 && content_type != 7) + if (content_type != 6 && content_type != 7 && content_type != 15) { if (!create_stat()) return 0;