SDL2-FFI

 view release on metacpan or  search on metacpan

lib/SDL2/hints.pm  view on Meta::CPAN


The bitmap header version 4 is required for proper alpha channel support and
SDL will use it when required. Should this not be desired, this hint can force
the use of the 40 byte header version which is supported everywhere.

If the hint is not set then surfaces with a colorkey or an alpha channel are
saved to a 32-bit BMP file with an alpha mask. SDL will use the bitmap header
version 4 and set the alpha mask accordingly. This is the default behavior
since SDL 2.0.5.

If the hint is set then surfaces with a colorkey or an alpha channel are saved
to a 32-bit BMP file without an alpha mask. The alpha channel data will be in
the file, but applications are going to ignore it. This was the default
behavior before SDL 2.0.5.

=item C<SDL_HINT_EMSCRIPTEN_ASYNCIFY>

A hint that specifies if SDL should give back control to the browser
automatically when running with asyncify.

Values:

    0   disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
    1   enable emscripten_sleep calls (default)

This hint only applies to the Emscripten platform.

=item C<SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT>

A hint that specifies a value to override the binding element for keyboard
inputs for Emscripten builds.

Values:

    #window     the JavaScript window object (default)
    #document   the JavaScript document object
    #screen     the JavaScript window.screen object
    #canvas     the default WebGL canvas element

Any other string without a leading # sign applies to the element on the page
with that ID.

This hint only applies to the Emscripten platform.

=item C<SDL_HINT_FRAMEBUFFER_ACCELERATION>

A hint that specifies how 3D acceleration is used with L<SDL_GetWindowSurface(
... )|SDL2/SDL_GetWindowSurface( ... )>.

Values:

    0   disable 3D acceleration
    1   enable 3D acceleration, using the default renderer
    X   enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)

By default SDL tries to make a best guess whether to use acceleration or not on
each platform.

SDL can try to accelerate the screen surface returned by
L<SDL_GetWindowSurface( ... )|SDL2/SDL_GetWindowSurface( ... )> by using
streaming textures with a 3D rendering engine. This variable controls whether
and how this is done.

=item C<SDL_HINT_GAMECONTROLLERCONFIG>

A variable that lets you provide a file with extra gamecontroller db entries.

This hint must be set before calling C<SDL_Init(SDL_INIT_GAMECONTROLLER)>.

You can update mappings after the system is initialized with
C<SDL_GameControllerMappingForGUID( )> and C<SDL_GameControllerAddMapping( )>.

=item C<SDL_HINT_GRAB_KEYBOARD>

A variable setting the double click time, in milliseconds.

=item C<SDL_HINT_IDLE_TIMER_DISABLED>

A hint that specifies a variable controlling whether the idle timer is disabled
on iOS.

Values:

    0   enable idle timer (default)
    1   disable idle timer

When an iOS application does not receive touches for some time, the screen is
dimmed automatically. For games where the accelerometer is the only input this
is problematic. This functionality can be disabled by setting this hint.

As of SDL 2.0.4, C<SDL_EnableScreenSaver( )> and C<SDL_DisableScreenSaver( )>
accomplish the same thing on iOS. They should be preferred over this hint.

=item C<SDL_HINT_IME_INTERNAL_EDITING>

A variable to control whether we trap the Android back button to handle it
manually. This is necessary for the right mouse button to work on some Android
devices, or to be able to trap the back button for use in your code reliably.
If set to true, the back button will show up as an C<SDL_KEYDOWN> /
C<SDL_KEYUP> pair with a keycode of C<SDL_SCANCODE_AC_BACK>.

The variable can be set to the following values:

    0   Back button will be handled as usual for system. (default)
    1   Back button will be trapped, allowing you to handle the key press
        manually. (This will also let right mouse click work on systems
        where the right mouse button functions as back.)

The value of this hint is used at runtime, so it can be changed at any time.

=item C<SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS>

A variable controlling whether the HIDAPI joystick drivers should be used.

This variable can be set to the following values:

    0   HIDAPI drivers are not used
    1   HIDAPI drivers are used (default)

This variable is the default for all drivers, but can be overridden by the
hints for specific drivers below.



( run in 2.944 seconds using v1.01-cache-2.11-cpan-f56aa216473 )