Add a special message for Kor if Home menu patch isn't installed#299
Add a special message for Kor if Home menu patch isn't installed#299cooolgamer wants to merge 1 commit intoastronautlevel2:masterfrom
Conversation
Helloman892
left a comment
There was a problem hiding this comment.
Looks simple enough but I'd need @astronautlevel2 to take a look too before I can comfortably merge this, due to the comment I made about patch detection.
| Result korPatchInstalled(Result archive_result){ | ||
| Handle handle; | ||
| Result res = 0; | ||
| if (R_FAILED(res = FSUSER_OpenFile(&handle, ArchiveSD, fsMakePath(PATH_ASCII, "/luma/titles/000400300000A902/code.ips"), FS_OPEN_READ, 0))) return res; |
There was a problem hiding this comment.
prefer: assignment to be done on declaration if possible. helps readability
| if (R_FAILED(res = FSUSER_OpenFile(&handle, ArchiveSD, fsMakePath(PATH_ASCII, "/luma/titles/000400300000A902/code.ips"), FS_OPEN_READ, 0))) return res; | ||
| FSFILE_Close(handle); | ||
| // The following file is needed to get the "change theme" button on the Home Menu allowing to create extdata, not needed if extdata is already created | ||
| if (R_FAILED(archive_result) && R_FAILED(res = FSUSER_OpenFile(&handle, ArchiveSD, fsMakePath(PATH_ASCII, "/luma/titles/000400300000A902/romfs/petit_LZ.bin"), FS_OPEN_READ, 0))) return res; |
There was a problem hiding this comment.
as above, though in this case;
prefer: assignment to be done as a statement rather than an expression
There was a problem hiding this comment.
This method of checking for the patch assumes that the user has Luma3DS/the KOR patch installed to the SD card rather than SysNAND or EmuNAND - is there a way we can detect that?
There was a problem hiding this comment.
There should be a way to detect this but I don't really see the point because themes only work with an sdcard inserted
There was a problem hiding this comment.
I got it, that's when the user use luma from ctrnand (or firm0?) and not on the sdcard, which not many people do but it's still best to think about this case, I see now. The way to detect it would be just a check to see where luma booted from by using this feature
Because Kor doesn't have themes, it requires a patch for it and people who have a modded korean 3ds may not know that.
This pr adds some checks and display a message about installing the patch instead of "set a default theme" because there's no "change theme" in the homemenu.
I tested each cases, and everything works perfectly.