Current directory without main args?

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

Moderators: cheriff, TyRaNiD

Post Reply
liquid8d
Posts: 66
Joined: Thu Jun 30, 2005 6:29 am

Current directory without main args?

Post by liquid8d »

Is there a way to find the current directory at startup without using the main arguments, maybe retrieving the full path of the loaded file?

LiQuiD8d
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

Poke around in crt0 or .. use the main arguments? Why not?
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

BTW: with the latest PSPSDK from svn the current directory is set to the one where the EBOOT.PBP is in at startup, so you can just write 'fopen("file", "r")' and it works, if "file" is in the same directory where EBOOT.PBP is.
liquid8d
Posts: 66
Joined: Thu Jun 30, 2005 6:29 am

Post by liquid8d »

mainly the only reason is i am using the launcher program for testing, and currently it doesn't work when arguments are set... good to know you can open a file with no path in the current directory though.. thanks.

LiQuiD8d
cooleyandy
Posts: 41
Joined: Sat Jul 02, 2005 10:12 am

Post by cooleyandy »

ahhh, great. sceIoOpen works in current directory now.
Post Reply