-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a special message for Kor if Home menu patch isn't installed #299
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -468,3 +468,14 @@ void save_zip_to_sd(char * filename, u32 size, char * buf, EntryMode mode) | |
remake_file(path, ArchiveSD, size); | ||
buf_to_file(size, path, ArchiveSD, buf); | ||
} | ||
|
||
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer: assignment to be done on declaration if possible. helps readability |
||
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as above, though in this case; |
||
FSFILE_Close(handle); | ||
return 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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