TWiLightMenu icon indicating copy to clipboard operation
TWiLightMenu copied to clipboard

System Selection in Select Menu

Open tmdobbin opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe. So this isn't really an issue with Twilight Menu, but rather just an idea I thought might be nice.

Describe the solution you'd like On pressing select, you can have that quick menu show up (with DSi Menu, TWLMenu++ Settings etc). I thought it could be a nice idea to be able to use the L and R shoulder buttons on that menu, and have a list of systems (DS, GBA, GB/GBC, a26 etc) with the little pixel art icons beside them perhaps, and pressing A on those options would take you straight to the folder with that system's games in, without having to back out of the folder you're in and then scroll along to the system you want. I suppose it's a very minor thing, but thought it would be nice to have.

Additional context Tried to add the feature myself to the fileBrowse.cpp file just as a proof of concept type thing by replacing the "TWLMenu++ Settings" option but couldn't get it to change directory. I tried chdir("sd:/roms/folder_for_system") but that doesn't work, I don't think it's the same call as when you enter a directory in the GUI. Also not sure how to have multiple pages on the select menu with L and R. I'm much more experienced in python although I do have a somewhat decent idea of C++. Any ideas are appreciated!

EDIT - Literally minutes after posting I found my code works to an extent. When you press A on the replaced TWLMenu++ Settings option, nothing seems to happen, but in fact the next directory you click will redirect to the one I specified (roms/gb in this case). Seems like a step in the right direction?

(In case it's at all relevant (probably not) I'm using a DSi with TWLMenu on the SD card and unlaunch.)

tmdobbin avatar Dec 20 '21 10:12 tmdobbin

Here's what I've done so far if anyone's interested.

Added the following code (Line 619)

void toGbDir(void) {
        snd().playLaunch();
        chdir("sd:/roms/gb");
}

This will make the next directory you enter redirect to the sd:/roms/gb folder. Of course, not what I want, but not far off.

Then I added an extra break in the switch statement for the select menu. (Line 1567 of the modified fileBrowse.cpp, right after line 1560 in the original file.)

...case 4:
                                launchManual();
                                break;
                        }
                break;
                }
                if ((pressed & KEY_B) || (pressed & KEY_SELECT)) {...

Which causes the menu to close when selecting the option that calls toGbDir. This probably breaks other things honestly but I can't test right now.

It really looks like the only things that need to be done now is a way to refresh what's on the screen after toGbDir is called (a way to do so probably exists, but I haven't found it yet after reading most of fileBrowse.cpp), and then possibly add extra pages to the select menu with the pixel art icons for each system. I'll keep going, though with my limited knowledge of both C++ and the DS, I don't think I'll get much further.

EDIT - Added line numbers for clarity

tmdobbin avatar Dec 20 '21 14:12 tmdobbin

This would only work if people actually followed the directive that we provide, which not everyone does. I personally don't agree with it.

lifehackerhansol avatar Dec 21 '21 00:12 lifehackerhansol

Really sorry, I don't think I understand what you mean?

tmdobbin avatar Dec 21 '21 07:12 tmdobbin

Not everyone uses the roms folder. This kind of setting would require people to follow that directory layout which I don't want to lock people into.

What would be better, I suppose, is launching the emulator directly, but not all emulators support reading the SD card yet. (SNEmulDS being the worst offender).

lifehackerhansol avatar Dec 21 '21 19:12 lifehackerhansol

Ah I understand, that makes sense actually. I suppose if this ever became a reality perhaps it would be a better idea to allow setting custom shortcuts or something similar, or like you suggested launching the emulator directly, at least for those that are able to read the SD.

tmdobbin avatar Dec 23 '21 11:12 tmdobbin