The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_GetBasePath and Debug/Release folders
SeanOConnor


Joined: 15 Jun 2016
Posts: 9
I'm using Visual Studio and I've got the standard Debug and Release configurations set up. When I use:

SDL_GetBasePath()

it gives me the path to where the .exe file is, so that's the Debug or Release folder.

But, all my game's resources are stored in folders one level down from that, as that's where the .exe file will live when the game is finished and distributed.

Anyone know the best workaround for this so that the game returns the required base folder whether I'm running the .exe file through Visual Studio, or just double clicking on it?