Renamed SDL_keysym to SDL_KeySym
Renamed SDL_scancode to SDL_ScanCode Added #defines to SDL_compat.h
This commit is contained in:
parent
477689ac83
commit
a2f2302255
29 changed files with 84 additions and 81 deletions
|
@ -34,7 +34,7 @@ static SDL_Color bg_color = { 50, 50, 100, 255 }; /* color of background *
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
SDL_scancode scancode; /* scancode of the key we want to map */
|
||||
SDL_ScanCode scancode; /* scancode of the key we want to map */
|
||||
int allow_no_mod; /* is the map valid if the key has no modifiers? */
|
||||
SDLMod mod; /* what modifiers are allowed for the mapping */
|
||||
int index; /* what index in the font does the scancode map to */
|
||||
|
@ -103,7 +103,7 @@ fontMapping map[TABLE_SIZE] = {
|
|||
};
|
||||
|
||||
/*
|
||||
This function maps an SDL_keysym to an index in the bitmap font.
|
||||
This function maps an SDL_KeySym to an index in the bitmap font.
|
||||
It does so by scanning through the font mapping table one entry
|
||||
at a time.
|
||||
|
||||
|
@ -113,7 +113,7 @@ fontMapping map[TABLE_SIZE] = {
|
|||
If there is no entry for the key, -1 is returned
|
||||
*/
|
||||
int
|
||||
keyToIndex(SDL_keysym key)
|
||||
keyToIndex(SDL_KeySym key)
|
||||
{
|
||||
int i, index = -1;
|
||||
for (i = 0; i < TABLE_SIZE; i++) {
|
||||
|
@ -240,7 +240,7 @@ main(int argc, char *argv[])
|
|||
SDL_Window *window;
|
||||
SDL_Event event; /* last event received */
|
||||
SDLMod mod; /* key modifiers of last key we pushed */
|
||||
SDL_scancode scancode; /* scancode of last key we pushed */
|
||||
SDL_ScanCode scancode; /* scancode of last key we pushed */
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
printf("Error initializing SDL: %s", SDL_GetError());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue