Mercurial > sdl-ios-xcode
comparison src/video/xbios/SDL_xbios.c @ 4195:13de8ea401db SDL-1.2
Start Milan video support
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Sat, 19 Sep 2009 13:21:05 +0000 |
parents | 05c9e942cc46 |
children | 1bf6585720e9 |
comparison
equal
deleted
inserted
replaced
4194:05c9e942cc46 | 4195:13de8ea401db |
---|---|
48 #include "SDL_xbios.h" | 48 #include "SDL_xbios.h" |
49 #include "SDL_xbios_blowup.h" | 49 #include "SDL_xbios_blowup.h" |
50 #include "SDL_xbios_centscreen.h" | 50 #include "SDL_xbios_centscreen.h" |
51 #include "SDL_xbios_sb3.h" | 51 #include "SDL_xbios_sb3.h" |
52 #include "SDL_xbios_tveille.h" | 52 #include "SDL_xbios_tveille.h" |
53 #include "SDL_xbios_milan.h" | |
53 | 54 |
54 #define XBIOS_VID_DRIVER_NAME "xbios" | 55 #define XBIOS_VID_DRIVER_NAME "xbios" |
55 | 56 |
56 #ifndef C_fVDI | 57 #ifndef C_fVDI |
57 #define C_fVDI 0x66564449L | 58 #define C_fVDI 0x66564449L |
180 if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) { | 181 if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) { |
181 if (!SDL_XBIOS_SB3Usable((scpn_cookie_t *)cookie_scpn)) { | 182 if (!SDL_XBIOS_SB3Usable((scpn_cookie_t *)cookie_scpn)) { |
182 return 0; | 183 return 0; |
183 } | 184 } |
184 } | 185 } |
186 break; | |
187 case VDO_MILAN: | |
185 break; | 188 break; |
186 default: | 189 default: |
187 return 0; | 190 return 0; |
188 } | 191 } |
189 | 192 |
485 | 488 |
486 if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) { | 489 if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) { |
487 SDL_XBIOS_ListBlowupModes(this, 0, (blow_cookie_t *)cookie_blow); | 490 SDL_XBIOS_ListBlowupModes(this, 0, (blow_cookie_t *)cookie_blow); |
488 } | 491 } |
489 } | 492 } |
493 break; | |
494 case VDO_MILAN: | |
495 SDL_XBIOS_ListMilanModes(this, 0); | |
490 break; | 496 break; |
491 } | 497 } |
492 | 498 |
493 for ( i=0; i<NUM_MODELISTS; ++i ) { | 499 for ( i=0; i<NUM_MODELISTS; ++i ) { |
494 int j; | 500 int j; |
550 if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) { | 556 if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) { |
551 SDL_XBIOS_ListBlowupModes(this, 1, (blow_cookie_t *)cookie_blow); | 557 SDL_XBIOS_ListBlowupModes(this, 1, (blow_cookie_t *)cookie_blow); |
552 } | 558 } |
553 } | 559 } |
554 break; | 560 break; |
561 case VDO_MILAN: | |
562 SDL_XBIOS_ListMilanModes(this, 1); | |
563 break; | |
555 } | 564 } |
556 | 565 |
557 XBIOS_screens[0]=NULL; | 566 XBIOS_screens[0]=NULL; |
558 XBIOS_screens[1]=NULL; | 567 XBIOS_screens[1]=NULL; |
559 XBIOS_shadowscreen=NULL; | 568 XBIOS_shadowscreen=NULL; |
692 SDL_memset(XBIOS_screensmem[1], 0, new_screen_size); | 701 SDL_memset(XBIOS_screensmem[1], 0, new_screen_size); |
693 | 702 |
694 XBIOS_screens[1]=(void *) (( (long) XBIOS_screensmem[1]+256) & 0xFFFFFF00UL); | 703 XBIOS_screens[1]=(void *) (( (long) XBIOS_screensmem[1]+256) & 0xFFFFFF00UL); |
695 modeflags |= SDL_DOUBLEBUF; | 704 modeflags |= SDL_DOUBLEBUF; |
696 } | 705 } |
697 | 706 |
698 /* Allocate the new pixel format for the screen */ | 707 /* Allocate the new pixel format for the screen */ |
699 if ( ! SDL_ReallocFormat(current, new_depth, 0, 0, 0, 0) ) { | 708 if ( ! SDL_ReallocFormat(current, new_depth, 0, 0, 0, 0) ) { |
700 XBIOS_FreeBuffers(this); | 709 XBIOS_FreeBuffers(this); |
701 SDL_SetError("Couldn't allocate new pixel format for requested mode"); | 710 SDL_SetError("Couldn't allocate new pixel format for requested mode"); |
702 return(NULL); | 711 return(NULL); |