Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
Berny
Posts: 5 Joined: Wed Jan 21, 2009 4:22 am
Post
by Berny » Fri Jul 31, 2009 7:32 pm
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 » Fri Jul 31, 2009 7:35 pm
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 » Sat Aug 01, 2009 5:09 am
>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 » Sat Aug 01, 2009 5:38 am
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 » Wed Aug 05, 2009 1:49 am
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 » Wed Aug 05, 2009 1:56 am
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 » Fri Aug 07, 2009 7:23 am
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 » Sat Aug 08, 2009 4:33 am
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();