mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-19 18:36:53 +02:00
playgo: reject missing package metadata
This commit is contained in:
+4
-10
@@ -52,14 +52,7 @@ union PlayGoOptionalChunk {
|
||||
};
|
||||
|
||||
static bool ensure_chunks_loaded() {
|
||||
if (g_chunks_num != 0) {
|
||||
return true;
|
||||
}
|
||||
if (!Loader::SystemContentGetChunksNum(&g_chunks_num)) {
|
||||
LOGF("Warning: assume that chunks count is 1\n");
|
||||
g_chunks_num = 1;
|
||||
}
|
||||
return g_chunks_num != 0;
|
||||
return g_chunks_num != 0 || Loader::SystemContentGetChunksNum(&g_chunks_num);
|
||||
}
|
||||
|
||||
static bool is_valid_chunk(uint16_t chunk_id) {
|
||||
@@ -121,11 +114,12 @@ int KYTY_SYSV_ABI PlayGoOpen(int* out_handle, const void* param) {
|
||||
if (param != nullptr) {
|
||||
return PLAYGO_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
if (!ensure_chunks_loaded()) {
|
||||
return PLAYGO_ERROR_NOT_SUPPORT_PLAYGO;
|
||||
}
|
||||
|
||||
*out_handle = PLAYGO_HANDLE;
|
||||
|
||||
ensure_chunks_loaded();
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user