Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / dbSetDir.

Author
Message
Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 9th Jun 2009 15:14
It appears to me that if you call it twice (relatively not absolutely)

e.g.


It sets the directory to "graphics\models\" the second time round when I would really want it to be "models".

Do I really have no choice but to save everything a "stuff" folder or is there a way around it.

Thanks
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 9th Jun 2009 15:22
This is because it uses the last directory as the relative directory, and not the default directory.
You could probably use
dbSetDir ( "..\\models\\" ); //do something
second time round.

Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 9th Jun 2009 15:26
I was trying to avoid using long file paths but I guess its just the way it has to be.

Thanks anyway
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 9th Jun 2009 21:34 Edited at: 9th Jun 2009 21:35
This function I wrote quickly should fix your problem:



Just call it as you are above but with the function name AlexI_SetDir

Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 10th Jun 2009 13:51
Thanks AlexI.
Thats exactly what I needed.
getcwd().
It would be really useful to learn C++

Login to post a reply

Server time is: 2024-11-05 23:02:47
Your offset time is: 2024-11-05 23:02:47