mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-18 01:08:16 +00:00
SDL_RWFromFile: On Apple platforms, offer a hint to not look in resource dirs.
Fixes #8403.
This commit is contained in:
@@ -3093,6 +3093,27 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_SHUTDOWN_DBUS_ON_QUIT "SDL_SHUTDOWN_DBUS_ON_QUIT"
|
||||
|
||||
/**
|
||||
* Specify if SDL_RWFromFile should use the resource dir on Apple platforms.
|
||||
*
|
||||
* SDL2 has always done this on Apple platforms, but it can be surprising to
|
||||
* try opening a path to discover that SDL adjusts the path to elsewhere, so
|
||||
* this hint allows that behavior to be disabled.
|
||||
*
|
||||
* If running from a App Bundle, this will be MyApp.app/Contents/Resources.
|
||||
* If running as a normal Unix-like process, this will be the directory where
|
||||
* the running binary lives. Setting this hint to 0 avoids this and just
|
||||
* uses the requested path as-is.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* - "0": SDL will not use the app resource directory.
|
||||
* - "1": SDL will use the app's resource directory (default).
|
||||
*
|
||||
* This hint is available since SDL 2.32.0.
|
||||
*/
|
||||
#define SDL_HINT_APPLE_RWFROMFILE_USE_RESOURCES "SDL_APPLE_RWFROMFILE_USE_RESOURCES"
|
||||
|
||||
|
||||
/**
|
||||
* An enumeration of hint priorities
|
||||
|
Reference in New Issue
Block a user