How can I find out the path of the homebrew

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Berny
Posts: 5
Joined: Wed Jan 21, 2009 4:22 am

How can I find out the path of the homebrew

Post by Berny »

How can I find out the path of the homebrew that is launched?

I have a PRX in game.txt, when a game or a homebrew is launched the plugin finds out the path of the homebrew/game!

Is there any function for this?

Thanks in advance and sorry for my english^^
slasher2661996
Posts: 91
Joined: Sun Feb 22, 2009 8:32 am
Location: Melbourne Australia ZOMG

Post by slasher2661996 »

PRX's in game.txt don't launch when it is a homebrew app, only a UMD or iso/cso
psPea
Posts: 60
Joined: Sat Sep 01, 2007 12:51 pm

Post by psPea »

>PRX's in game.txt don't launch when it is a homebrew app, only a UMD or iso/cso

since when?

@op
try the current working directory.
or is it different for each module?
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

in libc getcwd() give you the current directory

getcwd(str,len of str)
return you the current directory in the string str the second parametre is usualy
sizeof(str)
Berny
Posts: 5
Joined: Wed Jan 21, 2009 4:22 am

Post by Berny »

sauron_le_noir wrote:in libc getcwd() give you the current directory

getcwd(str,len of str)
return you the current directory in the string str the second parametre is usualy
sizeof(str)
thx

But where can I find the function getcwd(), which file?

I searched for libc, but i only found libc.a
Mon Ouïe
Posts: 36
Joined: Sun Jul 05, 2009 10:22 pm

Post by Mon Ouïe »

man getcwd ?
It's in unistd.h, and you already have its prototype.
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

as said by mon ouie look at
where you put your sdk/pspdev/psp/include/sys/unistd.h
char _EXFUN(*getcwd, (char *__buf, size_t __size ));
it is a standard libc function.
Davee
Posts: 43
Joined: Mon Jun 22, 2009 3:58 am

Post by Davee »

er...

Code: Select all

/**
 * Gets the filename of the executable to be launched after all modules of the api.
 *
 * @returns filename of executable or NULL if no executable found.
*/
char *sceKernelInitFileName();
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

davee (y)
Post Reply