mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
* input.h: Removed the SDL_MAJOR_VERSION guards around BuildKeyMaps() and
Key_Map() prototypes. Made Key_Map() to accept void* argument instead of SDL_KeyboardEvent* so that the code can compile even without SDL. * in_sdl.c (Key_Map): Adjusted for argument type change with proper cast to SDL_KeyboardEvent*. The assembler output is the same as before. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@194 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
7030aaf38c
commit
a369e60679
2 changed files with 3 additions and 5 deletions
|
@ -348,9 +348,9 @@ MapKey
|
|||
Map from SDL to quake keynums
|
||||
=======
|
||||
*/
|
||||
int Key_Map (SDL_KeyboardEvent *event)
|
||||
int Key_Map (void *event) /* SDL_KeyboardEvent *event */
|
||||
{
|
||||
return key_map[(*event).keysym.sym];
|
||||
return key_map[(*(SDL_KeyboardEvent *)event).keysym.sym];
|
||||
|
||||
/* TODO: keypad handling
|
||||
if (cl_keypad.value) {
|
||||
|
|
|
@ -47,11 +47,9 @@ void IN_Activate ();
|
|||
// called when the app becomes inactive
|
||||
void IN_Deactivate (qboolean free_cursor);
|
||||
|
||||
#if defined(SDL_MAJOR_VERSION)
|
||||
/* for SDL builds only */
|
||||
void BuildKeyMaps (void);
|
||||
int Key_Map (SDL_KeyboardEvent *event);
|
||||
#endif /* SDL_MAJOR_VERSION */
|
||||
int Key_Map (void *event); /* SDL_KeyboardEvent *event */
|
||||
|
||||
#endif /* _QUAKE_INPUT_H */
|
||||
|
||||
|
|
Loading…
Reference in a new issue