include/SDL_hints.h
author Tim Angus <tim@blackcompanystudios.co.uk>
Fri, 10 Jun 2011 14:23:36 +0100
changeset 5555 3ecad5e5dbe4
parent 5554 4b4258be8699
child 6138 4c64952a58fb
permissions -rw-r--r--
* SDL_IOS_IDLE_TIMER_DISABLED hint
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
/*
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
     2
  Simple DirectMedia Layer
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
     3
  Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     4
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
     5
  This software is provided 'as-is', without any express or implied
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
     7
  arising from the use of this software.
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     8
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    11
  freely, subject to the following restrictions:
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    12
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    14
     claim that you wrote the original software. If you use this software
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    16
     appreciated but is not required.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    18
     misrepresented as being the original software.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5484
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    20
*/
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    21
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    22
/**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    23
 *  \file SDL_hints.h
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    24
 *  
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    25
 *  Official documentation for SDL configuration variables
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    27
 *  This file contains functions to set and get configuration hints,
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
 *  as well as listing each of them alphabetically.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    30
 *  The convention for naming hints is SDL_HINT_X, where "SDL_X" is
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    31
 *  the environment variable that can be used to override the default.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    32
 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    33
 *  In general these hints are just that - they may or may not be
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    34
 *  supported or applicable on any given platform, but they provide
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    35
 *  a way for an application or user to give the library a hint as
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    36
 *  to how they would like the library to work.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    37
 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    38
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    39
#ifndef _SDL_hints_h
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    40
#define _SDL_hints_h
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    41
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    42
#include "SDL_stdinc.h"
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    43
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    44
#include "begin_code.h"
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    45
/* Set up for C function definitions, even when using C++ */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    46
#ifdef __cplusplus
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    47
/* *INDENT-OFF* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    48
extern "C" {
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    49
/* *INDENT-ON* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    50
#endif
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    51
5190
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    52
/**
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    53
 *  \brief  A variable controlling how 3D acceleration is used to accelerate the SDL 1.2 screen surface. 
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    54
 *
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    55
 *  SDL can try to accelerate the SDL 1.2 screen surface by using streaming
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    56
 *  textures with a 3D rendering engine.  This variable controls whether and
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    57
 *  how this is done.
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    58
 *
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    59
 *  This variable can be set to the following values:
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    60
 *    "0"       - Disable 3D acceleration
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    61
 *    "1"       - Enable 3D acceleration, using the default renderer.
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    62
 *    "X"       - Enable 3D acceleration, using X where X is one of the valid rendering drivers.  (e.g. "direct3d", "opengl", etc.)
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    63
 *
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    64
 *  By default SDL tries to make a best guess for each platform whether
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    65
 *  to use acceleration or not.
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    66
 */
82a48f4d65f6 Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms.
Sam Lantinga <slouken@libsdl.org>
parents: 5189
diff changeset
    67
#define SDL_HINT_FRAMEBUFFER_ACCELERATION   "SDL_FRAMEBUFFER_ACCELERATION"
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    68
5192
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    69
/**
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    70
 *  \brief  A variable specifying which render driver to use.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    71
 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    72
 *  If the application doesn't pick a specific renderer to use, this variable
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    73
 *  specifies the name of the preferred renderer.  If the preferred renderer
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    74
 *  can't be initialized, the normal default renderer is used.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    75
 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    76
 *  This variable is case insensitive and can be set to the following values:
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    77
 *    "direct3d"
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    78
 *    "opengl"
5233
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    79
 *    "opengles2"
5192
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    80
 *    "opengles"
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    81
 *    "software"
5233
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    82
 *
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    83
 *  The default varies by platform, but it's the first one in the list that
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    84
 *  is available on the current platform.
5192
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    85
 */
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    86
#define SDL_HINT_RENDER_DRIVER              "SDL_RENDER_DRIVER"
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    87
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
    88
/**
5233
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    89
 *  \brief  A variable controlling whether the OpenGL render driver uses shaders if they are available.
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    90
 *
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    91
 *  This variable can be set to the following values:
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    92
 *    "0"       - Disable shaders
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    93
 *    "1"       - Enable shaders
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    94
 *
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    95
 *  By default shaders are used if OpenGL supports them.
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    96
 */
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    97
#define SDL_HINT_RENDER_OPENGL_SHADERS      "SDL_RENDER_OPENGL_SHADERS"
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    98
ce4f91138031 Added a hint to control whether the OpenGL driver uses shaders.
Sam Lantinga <slouken@libsdl.org>
parents: 5200
diff changeset
    99
/**
5484
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   100
 *  \brief  A variable controlling the scaling quality
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   101
 *
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   102
 *  This variable can be set to the following values:
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   103
 *    "0" or "nearest" - Nearest pixel sampling
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   104
 *    "1" or "linear"  - Linear filtering (supported by OpenGL and Direct3D)
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   105
 *    "2" or "best"    - Anisotropic filtering (supported by Direct3D)
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   106
 *
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   107
 *  By default nearest pixel sampling is used
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   108
 */
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   109
#define SDL_HINT_RENDER_SCALE_QUALITY       "SDL_RENDER_SCALE_QUALITY"
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   110
e20c93bc9122 Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling.
Sam Lantinga <slouken@libsdl.org>
parents: 5272
diff changeset
   111
/**
5192
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   112
 *  \brief  A variable controlling whether updates to the SDL 1.2 screen surface should be synchronized with the vertical refresh, to avoid tearing.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   113
 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   114
 *  This variable can be set to the following values:
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   115
 *    "0"       - Disable vsync
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   116
 *    "1"       - Enable vsync
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   117
 *
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   118
 *  By default SDL does not sync screen surface updates with vertical refresh.
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   119
 */
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   120
#define SDL_HINT_RENDER_VSYNC               "SDL_RENDER_VSYNC"
5554
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   121
	
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   122
/**
5555
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   123
 *  \brief  A variable controlling whether the idle timer is disabled on iOS.
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   124
 *
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   125
 *  When an iOS app does not receive touches for some time, the screen is
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   126
 *  dimmed automatically. For games where the accelerometer is the only input
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   127
 *  this is problematic. This functionality can be disabled by setting this
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   128
 *  hint.
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   129
 *
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   130
 *  This variable can be set to the following values:
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   131
 *    "0"       - Enable idle timer
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   132
 *    "1"       - Disable idle timer
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   133
 */
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   134
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   135
	
3ecad5e5dbe4 * SDL_IOS_IDLE_TIMER_DISABLED hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5554
diff changeset
   136
/**
5554
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   137
 *  \brief  A variable controlling which orientations are allowed on iOS.
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   138
 *
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   139
 *  In some circumstances it is necessary to be able to explicitly control
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   140
 *  which UI orientations are allowed.
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   141
 *
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   142
 *  This variable is a space delimited list of the following values:
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   143
 *    "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   144
 */
4b4258be8699 * SDL_IOS_ORIENTATIONS hint
Tim Angus <tim@blackcompanystudios.co.uk>
parents: 5535
diff changeset
   145
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
5192
ef5a61ea3202 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints.
Sam Lantinga <slouken@libsdl.org>
parents: 5190
diff changeset
   146
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   147
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   148
/**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   149
 *  \brief  An enumeration of hint priorities
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   150
 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   151
typedef enum
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   152
{
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   153
    SDL_HINT_DEFAULT,
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   154
    SDL_HINT_NORMAL,
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   155
    SDL_HINT_OVERRIDE
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   156
} SDL_HintPriority;
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   157
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   158
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   159
/**
5200
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   160
 *  \brief Set a hint with a specific priority
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   161
 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   162
 *  The priority controls the behavior when setting a hint that already
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   163
 *  has a value.  Hints will replace existing hints of their priority and
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   164
 *  lower.  Environment variables are considered to have override priority.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   165
 * 
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   166
 *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   167
 */
5200
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   168
extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   169
                                                         const char *value,
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   170
                                                         SDL_HintPriority priority);
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   171
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   172
/**
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   173
 *  \brief Set a hint with normal priority
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   174
 * 
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   175
 *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   176
 */
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   177
extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
5200
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   178
                                             const char *value);
01bced9a4cc1 Created a simpler version of SDL_SetHint() that doesn't need a priority.
Sam Lantinga <slouken@libsdl.org>
parents: 5192
diff changeset
   179
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   180
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   181
/**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   182
 *  \brief Get a hint
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   183
 *  
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   184
 *  \return The string value of a hint variable.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   185
 */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   186
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   187
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   188
/**
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   189
 *  \brief  Clear all hints
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   190
 *
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   191
 *  This function is called during SDL_Quit() to free stored hints.
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   192
 */
5272
3c94c559f5c2 changeset: 5272:cb08ef104ac4
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   193
extern DECLSPEC void SDLCALL SDL_ClearHints(void);
5189
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   194
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   195
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   196
/* Ends C function definitions when using C++ */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   197
#ifdef __cplusplus
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   198
/* *INDENT-OFF* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   199
}
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   200
/* *INDENT-ON* */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   201
#endif
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   202
#include "close_code.h"
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   203
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   204
#endif /* _SDL_hints_h */
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   205
6f6a9340fb93 Added a hint system to allow configuration hints to be specified by the application.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   206
/* vi: set ts=4 sw=4 expandtab: */