2 Simple DirectMedia Layer
3 Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
25 * Official documentation for SDL configuration variables
27 * This file contains functions to set and get configuration hints,
28 * as well as listing each of them alphabetically.
30 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
31 * the environment variable that can be used to override the default.
33 * In general these hints are just that - they may or may not be
34 * supported or applicable on any given platform, but they provide
35 * a way for an application or user to give the library a hint as
36 * to how they would like the library to work.
42 #include "SDL_stdinc.h"
44 #include "begin_code.h"
45 /* Set up for C function definitions, even when using C++ */
53 * \brief A variable controlling how 3D acceleration is used to accelerate the SDL 1.2 screen surface.
55 * SDL can try to accelerate the SDL 1.2 screen surface by using streaming
56 * textures with a 3D rendering engine. This variable controls whether and
59 * This variable can be set to the following values:
60 * "0" - Disable 3D acceleration
61 * "1" - Enable 3D acceleration, using the default renderer.
62 * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
64 * By default SDL tries to make a best guess for each platform whether
65 * to use acceleration or not.
67 #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
70 * \brief A variable specifying which render driver to use.
72 * If the application doesn't pick a specific renderer to use, this variable
73 * specifies the name of the preferred renderer. If the preferred renderer
74 * can't be initialized, the normal default renderer is used.
76 * This variable is case insensitive and can be set to the following values:
83 * The default varies by platform, but it's the first one in the list that
84 * is available on the current platform.
86 #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
89 * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
91 * This variable can be set to the following values:
92 * "0" - Disable shaders
93 * "1" - Enable shaders
95 * By default shaders are used if OpenGL supports them.
97 #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
100 * \brief A variable controlling the scaling quality
102 * This variable can be set to the following values:
103 * "0" or "nearest" - Nearest pixel sampling
104 * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
105 * "2" or "best" - Anisotropic filtering (supported by Direct3D)
107 * By default nearest pixel sampling is used
109 #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
112 * \brief A variable controlling whether updates to the SDL 1.2 screen surface should be synchronized with the vertical refresh, to avoid tearing.
114 * This variable can be set to the following values:
115 * "0" - Disable vsync
118 * By default SDL does not sync screen surface updates with vertical refresh.
120 #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
123 * \brief A variable controlling whether the X11 VidMode extension should be used.
125 * This variable can be set to the following values:
126 * "0" - Disable XVidMode
127 * "1" - Enable XVidMode
129 * By default SDL will use XVidMode if it is available.
131 #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
134 * \brief A variable controlling whether the X11 Xinerama extension should be used.
136 * This variable can be set to the following values:
137 * "0" - Disable Xinerama
138 * "1" - Enable Xinerama
140 * By default SDL will use Xinerama if it is available.
142 #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
145 * \brief A variable controlling whether the X11 XRandR extension should be used.
147 * This variable can be set to the following values:
148 * "0" - Disable XRandR
149 * "1" - Enable XRandR
151 * By default SDL will not use XRandR because of window manager issues.
153 #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
156 * \brief A variable controlling whether grabbing input grabs the keyboard
158 * This variable can be set to the following values:
159 * "0" - Grab will affect only the mouse
160 * "1" - Grab will affect mouse and keyboard
162 * By default SDL will not grab the keyboard so system shortcuts still work.
164 #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
167 * \brief Minimize your SDL_Window if it loses key focus when in Fullscreen mode. Defaults to true.
170 #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
174 * \brief A variable controlling whether the idle timer is disabled on iOS.
176 * When an iOS app does not receive touches for some time, the screen is
177 * dimmed automatically. For games where the accelerometer is the only input
178 * this is problematic. This functionality can be disabled by setting this
181 * This variable can be set to the following values:
182 * "0" - Enable idle timer
183 * "1" - Disable idle timer
185 #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
188 * \brief A variable controlling which orientations are allowed on iOS.
190 * In some circumstances it is necessary to be able to explicitly control
191 * which UI orientations are allowed.
193 * This variable is a space delimited list of the following values:
194 * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
196 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
200 * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
202 * The variable can be set to the following values:
203 * "0" - Disable XInput timer (only uses direct input)
204 * "1" - Enable XInput timer (the default)
206 #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
210 * \brief A variable that lets you manually hint extra gamecontroller db entries
212 * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
214 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
215 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
217 #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
221 * \brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it.
222 * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
224 * This variable can be set to the following values:
225 * "0" - don't allow topmost
226 * "1" - allow topmost
228 #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
233 * \brief An enumeration of hint priorities
244 * \brief Set a hint with a specific priority
246 * The priority controls the behavior when setting a hint that already
247 * has a value. Hints will replace existing hints of their priority and
248 * lower. Environment variables are considered to have override priority.
250 * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
252 extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
254 SDL_HintPriority priority);
257 * \brief Set a hint with normal priority
259 * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
261 extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
268 * \return The string value of a hint variable.
270 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
273 * \brief Clear all hints
275 * This function is called during SDL_Quit() to free stored hints.
277 extern DECLSPEC void SDLCALL SDL_ClearHints(void);
280 /* Ends C function definitions when using C++ */
286 #include "close_code.h"
288 #endif /* _SDL_hints_h */
290 /* vi: set ts=4 sw=4 expandtab: */