SDL  2.0
SDL_system.h File Reference
#include "SDL_stdinc.h"
#include "SDL_keyboard.h"
#include "SDL_render.h"
#include "SDL_video.h"
#include "begin_code.h"
#include "close_code.h"
+ Include dependency graph for SDL_system.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* SDL_WindowsMessageHook) (void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam)
 Set a function that is called for every windows message, before TranslateMessage() More...
 
typedef struct IDirect3DDevice9 IDirect3DDevice9
 

Functions

void SDL_SetWindowsMessageHook (SDL_WindowsMessageHook callback, void *userdata)
 
int SDL_Direct3D9GetAdapterIndex (int displayIndex)
 Returns the D3D9 adapter index that matches the specified display index. More...
 
IDirect3DDevice9SDL_RenderGetD3D9Device (SDL_Renderer *renderer)
 Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer. More...
 
SDL_bool SDL_DXGIGetOutputInfo (int displayIndex, int *adapterIndex, int *outputIndex)
 Returns the DXGI Adapter and Output indices for the specified display index. More...
 
SDL_bool SDL_IsTablet (void)
 Return true if the current device is a tablet. More...
 

Detailed Description

Include file for platform specific SDL API functions

Definition in file SDL_system.h.

Typedef Documentation

◆ IDirect3DDevice9

Definition at line 58 of file SDL_system.h.

◆ SDL_WindowsMessageHook

typedef void( * SDL_WindowsMessageHook) (void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam)

Set a function that is called for every windows message, before TranslateMessage()

Definition at line 49 of file SDL_system.h.

Function Documentation

◆ SDL_Direct3D9GetAdapterIndex()

int SDL_Direct3D9GetAdapterIndex ( int  displayIndex)

Returns the D3D9 adapter index that matches the specified display index.

This adapter index can be passed to IDirect3D9::CreateDevice and controls on which monitor a full screen application will appear.

Referenced by SDLTest_CommonInit().

◆ SDL_DXGIGetOutputInfo()

SDL_bool SDL_DXGIGetOutputInfo ( int  displayIndex,
int *  adapterIndex,
int *  outputIndex 
)

Returns the DXGI Adapter and Output indices for the specified display index.

These can be passed to EnumAdapters and EnumOutputs respectively to get the objects required to create a DX10 or DX11 device and swap chain.

Referenced by SDLTest_CommonInit().

◆ SDL_IsTablet()

SDL_bool SDL_IsTablet ( void  )

Return true if the current device is a tablet.

Definition at line 479 of file SDL.c.

480 {
481 #if __ANDROID__
482  extern SDL_bool SDL_IsAndroidTablet(void);
483  return SDL_IsAndroidTablet();
484 #elif __IPHONEOS__
485  extern SDL_bool SDL_IsIPad(void);
486  return SDL_IsIPad();
487 #else
488  return SDL_FALSE;
489 #endif
490 }

References SDL_FALSE, and SDL_IsAndroidTablet().

◆ SDL_RenderGetD3D9Device()

IDirect3DDevice9* SDL_RenderGetD3D9Device ( SDL_Renderer renderer)

Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.

Once you are done using the device, you should release it to avoid a resource leak.

◆ SDL_SetWindowsMessageHook()

void SDL_SetWindowsMessageHook ( SDL_WindowsMessageHook  callback,
void userdata 
)
SDL_IsAndroidTablet
SDL_bool SDL_IsAndroidTablet(void)
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:162
SDL_FALSE
@ SDL_FALSE
Definition: SDL_stdinc.h:163