Lime-3DS-Emulator
Lime-3DS-Emulator copied to clipboard
android: Add game shortcuts to about game dialog
This PR adds a new button on the about-game menu, which allows you to create a shortcut on the home screen for any game. The shortcut skips the home menu and jumps straight to the game activity
Here is a video of it in action:
https://github.com/user-attachments/assets/134a0843-3a46-4d51-af69-1e140c8fb43a
There are bugs, though,
-
- I found this bug by accident because of the stability of the original fork. If a game crashes while being launched from a shortcut, the shortcut corrupts similarly to the video below
-
- The first shortcut I made corrupted on me, similar to the video below, as well
https://github.com/user-attachments/assets/28a8b164-0926-4225-a50d-464543fc1dab
Closes https://github.com/Lime3DS/Lime3DS/issues/185
Just wondering, are you making an attempt to fix these bugs or is the PR ready for review?
Need to find a good way to reproduce the bug so we can debug it, More testing is needed
I'll remove this from the roadmap temporarily until these issues are ironed out; There's no way of knowing how long it may take.
I found that the reason the game doesn't open in the video is because it was installed instead of .3ds rom file
The shortcut can't access the full path to the .app file , currently it juat returns the file name, so it just does nothing
I already figured out how to get the path to the .app file from inside the user directory, but I'm struggling to map tree/primary to it, Help would be appreciated
For now, I just decided to disable the shortcut button if a game is internally installed, just not to deal with the very special android permission system. If any other contributor wants to deal with formatting and handling the Installed games path correctly, feel free to add on top of this PR
Otherwise, the PR is ready for review, Let me know what placement is best for the button since this one was a placeholder
This is just a general question, is it possible to also make a shortcut for the home menu? Instead of starting it through the system files menu? Thanks in advance
is it possible to also make a shortcut for the home menu? Instead of starting it through the system files menu?
What do you mean? That's exactly what this PR is doing.
is it possible to also make a shortcut for the home menu? Instead of starting it through the system files menu?
What do you mean? That's exactly what this PR is doing.
Oh, i thought it was to launch games only, not the 3ds home menu as well, my bad
is it possible to also make a shortcut for the home menu? Instead of starting it through the system files menu?
What do you mean? That's exactly what this PR is doing.
Oh, i thought it was to launch games only, not the 3ds home menu as well, my bad
I assume the 3ds system menu is installed inside the userDirevotry, in that case no it won't work because Android file permissions are rocket science
.3ds ROMs only, the shortcut button is grayed out for internally installed games for reasons I stated above
This is just a general question, is it possible to also make a shortcut for the home menu? Instead of starting it through the system files menu? Thanks in advance
Would making something like a shortcut of the home menu in the games list help? This is something I would like as well. If so you could open an issue requesting the feature.
I'll probably do so for other devs, but no, I'm not dealing with the Android permissions system myself
I'll probably do so for other devs, but no, I'm not dealing with the Android permissions system myself
What i meant was a shortcut in the list that shows the games (not like a shortcut like the ones in this pull request) since the home menu is treated kinda like an app in the 3ds from what i've seen. it is stored in the nand quite similarly to installed apps from what ive seen.
Edit: It shouldn't be too complex as you can just copy what is done internally when the boot home menu button is pressed and do that but with an entry in the games list? It would also needs checks for if the home menu is installed so it wouldn't be that simple.
I'll probably do so for other devs, but no, I'm not dealing with the Android permissions system myself
What i meant was a shortcut in the list that shows the games (not like a shortcut like the ones in this pull request) since the home menu is treated kinda like an app in the 3ds from what i've seen. it is stored in the nand quite similarly to installed apps from what ive seen.
Edit: It shouldn't be too complex as you can just copy what is done internally when the boot home menu button is pressed and do that but with an entry in the games list? It would also needs checks for if the home menu is installed so it wouldn't be that simple.
It's not a bad idea, but outside the scope of this PR You should open an issue so we can track it, and maybe one of us will implement it
Since this issue of the internal app path was dealt with The game shortcuts are working for internal apps as well now
Shoutkuts to @OpenSauce04
@kleidis Can you verify that the imports in 4d4d582 served no purpose I missed? I have run this code on both Android 14 and Android 9 and saw no issues creating shortcuts.
As far as i can see by a quick glance,
It should be fine to keep them removed, most likely left accidentally by the mandarine dev when porting from Yuzu
And since the PR was made 3 months ago, i forgot to remove
Tested CIA/app files myself today All seems to work good