mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
nyx: derive emuMMC ID from its main path
This allows every emuMMC to have a unique id because its path is unique.
This commit is contained in:
parent
d61be73bca
commit
af7bee2231
1 changed files with 9 additions and 1 deletions
|
@ -110,7 +110,15 @@ void save_emummc_cfg(u32 part_idx, u32 sector_start, const char *path)
|
|||
f_puts("\npath=", &fp);
|
||||
f_puts(path, &fp);
|
||||
}
|
||||
f_puts("\nid=0x0000", &fp);
|
||||
|
||||
// Get ID from path.
|
||||
u32 id_from_path = 0;
|
||||
if (strlen(path) >= 4)
|
||||
memcpy(&id_from_path, path + strlen(path) - 4, 4);
|
||||
f_puts("\nid=0x", &fp);
|
||||
itoa(id_from_path, lbuf, 16);
|
||||
f_puts(lbuf, &fp);
|
||||
|
||||
f_puts("\nnintendo_path=", &fp);
|
||||
if (path)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue