comparison src/video/fbcon/SDL_fbevents.c @ 2735:204be4fc2726

Final merge of Google Summer of Code 2008 work... Port SDL 1.3 to the Nintendo DS by Darren Alton, mentored by Sam Lantinga
author Sam Lantinga <slouken@libsdl.org>
date Wed, 27 Aug 2008 15:10:03 +0000
parents c121d94672cb
children 99210400e8b9
comparison
equal deleted inserted replaced
2734:dd25eabe441c 2735:204be4fc2726
543 tv.tv_sec = 1; 543 tv.tv_sec = 1;
544 tv.tv_usec = 0; 544 tv.tv_usec = 0;
545 if (select(fd + 1, &fdset, 0, 0, &tv) < 1) { 545 if (select(fd + 1, &fdset, 0, 0, &tv) < 1) {
546 break; 546 break;
547 } 547 }
548 } 548 } while ((read(fd, &ch, sizeof(ch)) == sizeof(ch)) &&
549 while ((read(fd, &ch, sizeof(ch)) == sizeof(ch)) && 549 ((ch == 0xFA) || (ch == 0xAA)));
550 ((ch == 0xFA) || (ch == 0xAA)));
551 550
552 /* Experimental values (Logitech wheelmouse) */ 551 /* Experimental values (Logitech wheelmouse) */
553 #ifdef DEBUG_MOUSE 552 #ifdef DEBUG_MOUSE
554 fprintf(stderr, "Last mouse mode: 0x%x\n", ch); 553 fprintf(stderr, "Last mouse mode: 0x%x\n", ch);
555 #endif 554 #endif
968 FB_SavePaletteTo(this, 256, screen_palette); 967 FB_SavePaletteTo(this, 256, screen_palette);
969 ioctl(console_fd, FBIOGET_VSCREENINFO, &screen_vinfo); 968 ioctl(console_fd, FBIOGET_VSCREENINFO, &screen_vinfo);
970 ioctl(keyboard_fd, KDSETMODE, KD_TEXT); 969 ioctl(keyboard_fd, KDSETMODE, KD_TEXT);
971 ioctl(keyboard_fd, VT_UNLOCKSWITCH, 1); 970 ioctl(keyboard_fd, VT_UNLOCKSWITCH, 1);
972 } 971 }
972
973 static void 973 static void
974 switch_vt_done(_THIS) 974 switch_vt_done(_THIS)
975 { 975 {
976 SDL_Surface *screen = SDL_VideoSurface; 976 SDL_Surface *screen = SDL_VideoSurface;
977 977
993 993
994 SDL_PrivateAppActive(1, 994 SDL_PrivateAppActive(1,
995 (SDL_APPACTIVE | SDL_APPINPUTFOCUS | 995 (SDL_APPACTIVE | SDL_APPINPUTFOCUS |
996 SDL_APPMOUSEFOCUS)); 996 SDL_APPMOUSEFOCUS));
997 } 997 }
998
998 static void 999 static void
999 switch_vt(_THIS, unsigned short which) 1000 switch_vt(_THIS, unsigned short which)
1000 { 1001 {
1001 struct vt_stat vtstate; 1002 struct vt_stat vtstate;
1002 1003
1111 if (FD_ISSET(mouse_fd, &fdset)) { 1112 if (FD_ISSET(mouse_fd, &fdset)) {
1112 handle_mouse(this); 1113 handle_mouse(this);
1113 } 1114 }
1114 } 1115 }
1115 } 1116 }
1116 } 1117 } while (posted);
1117 while (posted);
1118 } 1118 }
1119 1119
1120 void 1120 void
1121 FB_InitOSKeymap(_THIS) 1121 FB_InitOSKeymap(_THIS)
1122 { 1122 {