comparison src/video/fbcon/SDL_fbevents.c @ 91:e85e03f195b4

From: "Markus F.X.J. Oberhumer" Subject: SDL CVS patches below you will find some small patches against the current SDL CVS. It adresses these things: 1) Use "&" instead of "%" in some cases. For negative signed integers (x % 8) is not always (x & 7), and the compiler can produce slightly faster code when using "&" here. 2) Some const issues.
author Sam Lantinga <slouken@lokigames.com>
date Sat, 07 Jul 2001 20:20:17 +0000
parents 280ff3af2ecc
children a746656b7599
comparison
equal deleted inserted replaced
90:ee1f71c10889 91:e85e03f195b4
245 245
246 int FB_OpenKeyboard(_THIS) 246 int FB_OpenKeyboard(_THIS)
247 { 247 {
248 /* Open only if not already opened */ 248 /* Open only if not already opened */
249 if ( keyboard_fd < 0 ) { 249 if ( keyboard_fd < 0 ) {
250 char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; 250 static const char * const tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
251 char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; 251 static const char * const vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
252 int i, tty0_fd; 252 int i, tty0_fd;
253 253
254 /* Try to query for a free virtual terminal */ 254 /* Try to query for a free virtual terminal */
255 tty0_fd = -1; 255 tty0_fd = -1;
256 for ( i=0; tty0[i] && (tty0_fd < 0); ++i ) { 256 for ( i=0; tty0[i] && (tty0_fd < 0); ++i ) {
522 522
523 /* STD MICE */ 523 /* STD MICE */
524 524
525 if ( mousedev == NULL ) { 525 if ( mousedev == NULL ) {
526 /* FIXME someday... allow multiple mice in this driver */ 526 /* FIXME someday... allow multiple mice in this driver */
527 char *ps2mice[] = { 527 static const char * const ps2mice[] = {
528 "/dev/input/mice", "/dev/usbmouse", "/dev/psaux", NULL 528 "/dev/input/mice", "/dev/usbmouse", "/dev/psaux", NULL
529 }; 529 };
530 /* First try to use GPM in repeater mode */ 530 /* First try to use GPM in repeater mode */
531 if ( mouse_fd < 0 ) { 531 if ( mouse_fd < 0 ) {
532 if ( gpm_available() ) { 532 if ( gpm_available() ) {