astronautlevel2 / StarUpdater

Updater for Luma3DS by AuroraWright
MIT License
30 stars 5 forks source link

Automatically detect current setup and use it as presets #12

Open astronautlevel2 opened 8 years ago

gnmmarechal commented 8 years ago

uh. what do you mean by that? Detecting the payload location automatically?

astronautlevel2 commented 8 years ago

Detect if it's menuhax or a9lh by default and set isMenuhax, and detect if it's the dev version by default and set isDev.

gnmmarechal commented 8 years ago

Ah, I see. I suppose detecting CIA/3DSX wouldn't be enough as some may be using a StarUpdater CIA with EmuNAND.

gnmmarechal commented 8 years ago

I'll try to figure this out in a few days. However, my solution may not be perfect, or the best one.

To detect MenuHax mode, detecting /3ds/Luma3DS/Luma3DS.3dsx would be a way of doing it. However, we must consider there are those who boot Luma directly (at /boot.3dsx). Since many CFW users use a boot.3dsx file, that wouldn't be enough to detect the mode.

Not to mention now every mode has an arm9loaderhax.bin. Which means if anything, it'd go like this:

if (condition for M1) then

elseif (condition for M2) then

else -- Assume it's A9LH if nothing else

end