Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cooolgamer
Copy link
Contributor

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.

Copy link
Collaborator

@Helloman892 Helloman892 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above, though in this case;
prefer: assignment to be done as a statement rather than an expression

Copy link
Collaborator

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?

Copy link
Contributor Author

@cooolgamer cooolgamer Apr 24, 2024

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

Copy link
Contributor Author

@cooolgamer cooolgamer Apr 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants