test/testkeys.c
author Sam Lantinga <slouken@libsdl.org>
Wed, 25 Jan 2006 07:04:02 +0000
changeset 1265 670e74bf5cc8
parent 1154 d93862a3d821
child 1662 782fd950bd46
child 1895 c121d94672cb
permissions -rw-r--r--
Date: Mon, 22 Sep 2003 23:31:54 -0700 (PDT)
From: Rob Neff
Subject: [SDL] testgl.c minor bug fix for fullscreen mode

from:

if ( strcmp(argv[1], "-fullscreen") == 0 ) {

to:

if ( strcmp(argv[i], "-fullscreen") == 0 ) {


Minor bug, but might help someone else out who is trying to pass
the command-line params -logo -fullscreen like I was! :)
slouken@0
     1
slouken@0
     2
/* Print out all the keysyms we have, just to verify them */
slouken@0
     3
slouken@0
     4
#include <stdio.h>
slouken@0
     5
#include <ctype.h>
icculus@1154
     6
#include <stdlib.h>
icculus@1154
     7
#include <string.h>
slouken@0
     8
slouken@0
     9
#include "SDL.h"
slouken@0
    10
slouken@0
    11
int main(int argc, char *argv[])
slouken@0
    12
{
slouken@0
    13
	SDLKey key;
slouken@0
    14
slouken@0
    15
	if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
slouken@0
    16
		fprintf(stderr, "Couldn't initialize SDL: %s\n",
slouken@0
    17
							SDL_GetError());
slouken@0
    18
		exit(1);
slouken@0
    19
	}
slouken@0
    20
	for ( key=SDLK_FIRST; key<SDLK_LAST; ++key ) {
slouken@0
    21
		printf("Key #%d, \"%s\"\n", key, SDL_GetKeyName(key));
slouken@0
    22
	}
slouken@0
    23
	SDL_Quit();
slouken@0
    24
	return(0);
slouken@0
    25
}