OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4AppSDL.cpp File Reference
#include "C4Include.h"
#include "platform/C4App.h"
#include "platform/C4Window.h"
#include "graphics/C4DrawGL.h"
#include "platform/StdFile.h"
#include "lib/StdBuf.h"
#include "gui/C4MouseControl.h"
#include "game/C4Application.h"
#include "gui/C4Gui.h"
#include "platform/C4GamePadCon.h"
#include "C4Version.h"
Include dependency graph for C4AppSDL.cpp:

Go to the source code of this file.

Macros

#define SDL_SCANCODE_KEYCODE
 
#define X(sdl, oc)   case sdl: return oc;
 
#define X(sdl, oc)   case oc: scancode = sdl; break;
 

Functions

const char * KeycodeToString (C4KeyCode code)
 

Macro Definition Documentation

#define SDL_SCANCODE_KEYCODE

Definition at line 134 of file C4AppSDL.cpp.

Referenced by KeycodeToString().

#define X (   sdl,
  oc 
)    case sdl: return oc;
#define X (   sdl,
  oc 
)    case oc: scancode = sdl; break;

Function Documentation

const char* KeycodeToString ( C4KeyCode  code)

Definition at line 252 of file C4AppSDL.cpp.

References SDL_SCANCODE_KEYCODE.

Referenced by C4KeyCodeEx::KeyCode2String().

253 {
254  SDL_Scancode scancode;
255  switch (code)
256  {
257 #define X(sdl, oc) case oc: scancode = sdl; break;
259 #undef X
260  default:
261  return nullptr;
262  }
263  return SDL_GetScancodeName(scancode);
264 }
#define SDL_SCANCODE_KEYCODE
Definition: C4AppSDL.cpp:134

Here is the caller graph for this function: