.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_GetBasePath: .\" https://wiki.libsdl.org/SDL_GetBasePath .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-3.1.0 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_GetBasePath .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_GetBasePath 3 "SDL 3.1.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_GetBasePath \- Get the directory where the application was run from\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "char* SDL_GetBasePath(void); .fi .SH DESCRIPTION This is not necessarily a fast call, so you should call this once near startup and save the string if you need it\[char46] .B macOS and iOS Specific Functionality : If the application is in a "\[char46]app" bundle, this function returns the Resource directory (e\[char46]g\[char46] MyApp\[char46]app/Contents/Resources/)\[char46] This behaviour can be overridden by adding a property to the Info\[char46]plist file\[char46] Adding a string key with the name .BR SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the behaviour\[char46] Supported values for the .BR SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an application in /Applications/SDLApp/MyApp\[char46]app): - .BR resource : bundle resource directory (the default)\[char46] For example: .BR /Applications/SDLApp/MyApp\[char46]app/Contents/Resources - .BR bundle : the Bundle directory\[char46] For example: .BR /Applications/SDLApp/MyApp\[char46]app/ - .BR parent : the containing directory of the bundle\[char46] For example: .BR /Applications/SDLApp/ .B Nintendo 3DS Specific Functionality : This function returns "romfs" directory of the application as it is uncommon to store resources outside the executable\[char46] As such it is not a writable directory\[char46] The returned path is guaranteed to end with a path separator ('\\' on Windows, '/' on most other platforms)\[char46] The pointer returned is owned by the caller\[char46] Please call .BR SDL_free () on the pointer when done with it\[char46] .SH RETURN VALUE Returns an absolute path in UTF-8 encoding to the application data directory\[char46] NULL will be returned on error or when the platform doesn't implement this functionality, call .BR SDL_GetError () for more information\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_GetPrefPath (3)