Homebrew ctrulib get name and path of current 3dsx

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Is there any way for ctrulib to identify the name and full path of the currently running 3dsx? I want gridlauncher to be able to find its own executable on the SD card.
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Is there any way for ctrulib to identify the name and full path of the currently running 3dsx? I want gridlauncher to be able to find its own executable on the SD card.

Is it not argv[0]? Dunno if entrypoints bother setting up an initial argc/argv, though.
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Is it not argv[0]? Dunno if entrypoints bother setting up an initial argc/argv, though.
I don't know if the entry points set it up, but the hb launcher's main() doesn't specify any parameters so I assume none are passed.

Yeah, take a look at the romfs code:

https://github.com/smealum/ctrulib/blob/master/libctru/source/romfs_dev.c#L119

For 3dsx romfs support, it has to open itself for reading (the romfs is embedded in the 3dsx), and that code handles it.
Thank you, I'll look at this :)
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
I don't know if the entry points set it up, but the hb launcher's main() doesn't specify any parameters so I assume none are passed.


Thank you, I'll look at this :)

I just tried it, and yeah, themehax at least doesn't seem to push any arguments to regular argv. I guess it makes sense, since a boot.3dsx wouldn't really need arguments in the first place. Maybe Cruel's idea will work.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Well start walking towards them +1