src/events/SDL_keyboard.c
changeset 1612 97d0966f4bf7
parent 1507 1ff64ad478b2
child 1659 14717b52abc0
     1.1 --- a/src/events/SDL_keyboard.c	Fri Mar 24 05:11:51 2006 +0000
     1.2 +++ b/src/events/SDL_keyboard.c	Fri Mar 24 06:10:24 2006 +0000
     1.3 @@ -34,7 +34,7 @@
     1.4  static SDLMod SDL_ModState;
     1.5  int SDL_TranslateUNICODE = 0;
     1.6  
     1.7 -static char *keynames[SDLK_LAST];	/* Array of keycode names */
     1.8 +static const char *keynames[SDLK_LAST];	/* Array of keycode names */
     1.9  
    1.10  /*
    1.11   * jk 991215 - added
    1.12 @@ -356,7 +356,7 @@
    1.13  
    1.14  char *SDL_GetKeyName(SDLKey key)
    1.15  {
    1.16 -	char *keyname;
    1.17 +	const char *keyname;
    1.18  
    1.19  	keyname = NULL;
    1.20  	if ( key < SDLK_LAST ) {
    1.21 @@ -365,7 +365,8 @@
    1.22  	if ( keyname == NULL ) {
    1.23  		keyname = "unknown key";
    1.24  	}
    1.25 -	return(keyname);
    1.26 +	/* FIXME: make this function const in 1.3 */
    1.27 +	return (char *)(keyname);
    1.28  }
    1.29  
    1.30  /* These are global for SDL_eventloop.c */