Skip to content

Commit ca1af01

Browse files
committed
load keystones
from Apollo data pack
1 parent 9a07bde commit ca1af01

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ All notable changes to the `apollo-ps4` project will be documented in this file.
2323

2424
### Misc
2525

26+
* Include original keystones for 116 games
2627
* Updated audio library to `libs3m`
2728
* Updated [`apollo-lib`](https://github.com/bucanero/apollo-lib) Patch Engine to v0.6.0
2829
- Add host callbacks (username, wlan mac, psid, account id)

source/exec_cmd.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,15 +490,19 @@ static void copySavePFS(const save_entry_t* save)
490490
return;
491491
}
492492

493-
static void copyKeystone(int import)
493+
static void copyKeystone(const save_entry_t* entry, int import)
494494
{
495495
char path_data[256];
496496
char path_save[256];
497497

498-
snprintf(path_save, sizeof(path_save), "%ssce_sys/keystone", selected_entry->path);
499-
snprintf(path_data, sizeof(path_data), APOLLO_USER_PATH "%s/keystone", apollo_config.user_id, selected_entry->title_id);
498+
snprintf(path_save, sizeof(path_save), "%ssce_sys/keystone", entry->path);
499+
snprintf(path_data, sizeof(path_data), APOLLO_USER_PATH "%s/keystone", apollo_config.user_id, entry->title_id);
500500
mkdirs(path_data);
501501

502+
// try to import keystone from data folder
503+
if (import && file_exists(path_data) != SUCCESS)
504+
snprintf(path_data, sizeof(path_data), APOLLO_DATA_PATH "%s.keystone", entry->title_id);
505+
502506
LOG("Copy '%s' <-> '%s'...", path_save, path_data);
503507

504508
if (copy_file(import ? path_data : path_save, import ? path_save : path_data) == SUCCESS)
@@ -1167,12 +1171,12 @@ void execCodeCommand(code_entry_t* code, const char* codecmd)
11671171
break;
11681172

11691173
case CMD_EXP_KEYSTONE:
1170-
copyKeystone(0);
1174+
copyKeystone(selected_entry, 0);
11711175
code->activated = 0;
11721176
break;
11731177

11741178
case CMD_IMP_KEYSTONE:
1175-
copyKeystone(1);
1179+
copyKeystone(selected_entry, 1);
11761180
code->activated = 0;
11771181
break;
11781182

0 commit comments

Comments
 (0)