SDL
2.0
|
Go to the source code of this file.
Data Structures | |
struct | MappingStep |
Macros | |
#define | SCREEN_WIDTH 512 |
#define | SCREEN_HEIGHT 317 |
#define | MAP_WIDTH 512 |
#define | MAP_HEIGHT 317 |
#define | MARKER_BUTTON 1 |
#define | MARKER_AXIS 2 |
Functions | |
SDL_Texture * | LoadTexture (SDL_Renderer *renderer, char *file, SDL_bool transparent) |
static SDL_bool | WatchJoystick (SDL_Joystick *joystick) |
int | main (int argc, char *argv[]) |
#define MAP_HEIGHT 317 |
Definition at line 33 of file controllermap.c.
#define MAP_WIDTH 512 |
Definition at line 32 of file controllermap.c.
#define MARKER_AXIS 2 |
Definition at line 36 of file controllermap.c.
Referenced by WatchJoystick().
#define MARKER_BUTTON 1 |
Definition at line 35 of file controllermap.c.
Referenced by WatchJoystick().
#define SCREEN_HEIGHT 317 |
Definition at line 29 of file controllermap.c.
Referenced by WatchJoystick().
#define SCREEN_WIDTH 512 |
Definition at line 28 of file controllermap.c.
Referenced by WatchJoystick().
SDL_Texture* LoadTexture | ( | SDL_Renderer * | renderer, |
char * | file, | ||
SDL_bool | transparent | ||
) |
Definition at line 50 of file controllermap.c.
References SDL_PixelFormat::BitsPerPixel, SDL_Surface::format, NULL, SDL_PixelFormat::palette, SDL_Surface::pixels, SDL_CreateTextureFromSurface, SDL_FreeSurface, SDL_GetError, SDL_LoadBMP, SDL_LOG_CATEGORY_APPLICATION, SDL_LogError, SDL_SetColorKey, and SDL_TRUE.
Referenced by WatchJoystick().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 340 of file controllermap.c.
References i, NULL, SDL_FALSE, SDL_FINGERDOWN, SDL_GetError, SDL_Init, SDL_INIT_JOYSTICK, SDL_INIT_VIDEO, SDL_JOYDEVICEADDED, SDL_JoystickClose, SDL_JoystickGetGUID, SDL_JoystickGetGUIDString, SDL_JoystickInstanceID, SDL_JoystickNameForIndex, SDL_JoystickNumAxes, SDL_JoystickNumBalls, SDL_JoystickNumButtons, SDL_JoystickNumHats, SDL_JoystickOpen, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, SDL_MOUSEBUTTONDOWN, SDL_NumJoysticks, SDL_QUIT, SDL_QuitSubSystem, SDL_TRUE, SDL_WaitEvent, SDL_Event::type, and WatchJoystick().
|
static |
Definition at line 100 of file controllermap.c.
References MappingStep::angle, MappingStep::axis, SDL_JoyAxisEvent::axis, background, MappingStep::button, SDL_JoyButtonEvent::button, done, MappingStep::field, SDL_Rect::h, MappingStep::hat, SDL_JoyHatEvent::hat, MappingStep::hat_value, SDL_Event::jaxis, SDL_Event::jbutton, SDL_Event::jhat, SDL_Event::key, SDL_KeyboardEvent::keysym, LoadTexture(), MappingStep::mapping, MappingStep::marker, MARKER_AXIS, MARKER_BUTTON, NULL, retval, screen, SCREEN_HEIGHT, SCREEN_WIDTH, SDL_ALPHA_OPAQUE, SDL_arraysize, SDL_CreateRenderer, SDL_CreateWindow, SDL_DestroyRenderer, SDL_DestroyWindow, SDL_FALSE, SDL_FINGERDOWN, SDL_GetError, SDL_GetPlatform, SDL_GetTicks(), SDL_HAT_CENTERED, SDL_JOYAXISMOTION, SDL_JOYBALLMOTION, SDL_JOYBUTTONUP, SDL_JOYHATMOTION, SDL_JoystickGetGUID, SDL_JoystickGetGUIDString, SDL_JoystickInstanceID, SDL_JoystickName, SDL_JoystickNumAxes, SDL_JoystickNumBalls, SDL_JoystickNumButtons, SDL_JoystickNumHats, SDL_KEYDOWN, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LogError, SDL_MOUSEBUTTONDOWN, SDL_PollEvent, SDL_QueryTexture, SDL_QUIT, SDL_RaiseWindow, SDL_RenderClear, SDL_RenderCopy, SDL_RenderCopyEx, SDL_RenderPresent, SDL_RenderSetLogicalSize, SDL_SetRenderDrawColor, SDL_SetTextureAlphaMod, SDL_SetTextureColorMod, SDL_snprintf, SDL_strlcat, SDL_strlcpy, SDL_TRUE, SDL_WINDOWPOS_CENTERED, SDLK_AC_BACK, SDLK_BACKSPACE, SDLK_ESCAPE, SDLK_SPACE, SDL_Keysym::sym, SDL_Event::type, SDL_JoyAxisEvent::value, SDL_JoyHatEvent::value, SDL_Rect::w, window, MappingStep::x, SDL_Rect::x, MappingStep::y, and SDL_Rect::y.
Referenced by main().