comparison src/video/macdsp/SDL_dspvideo.c @ 1135:cf6133247d34

Mac Classic and CodeWarrior patches. --ryan. From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se> Subject: Re: [SDL] Updated Mac patch Date: Tue, 6 Sep 2005 15:21:27 +0200 To: A list for developers using the SDL library <sdl@libsdl.org> Earlier, I wrote: > Updated the previous Mac patch to disable Carbon by default. > Also "fixed" the SDL.spec again, so that it builds on Darwin. > > http://www.algonet.se/~afb/SDL-1.2.9-mac.patch > Also applied fine to SDL12 CVS, when I tried it. > > Haven't completed any new packaging or projects for Xcode/PB, > but it seems to build and install fine here (in development). Tested the new patch to build with old CodeWarrior and MPW, and it seems it needed some hacks with those old headers... Just in case you want to support the archeological versions - here is a small add-on to the above patch, to fix those... http://www.algonet.se/~afb/SDL-1.2.9-classic.patch I couldn't get the old CW5 projects to build without a few modifications - such as deleting the stray old header in: "CWprojects/Support/Carbon/Include/ConditionalMacros.h" ? But I updated both projects to CW6 too and built for Carbon, and it ran all of the Mac test projects without any problems. The MPW file seems to have compiled, with a small order change. As long as you're still shipping the CWProjects and MPWmake with the download, they should probably be updated/fixed ? (another "solution" would of course be to just delete them) I'll post my new projects along with the new Xcode projects later on, along with XML exports of the various .mcp files. (CW5 builds for Classic / "PPC", and CW6 builds for Carbon) It'll be packaged as a part of the next SpriteWorld X release... http://spriteworldx.sourceforge.net/ [Classic/Carbon/Win/X11] --anders
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 08 Sep 2005 06:34:28 +0000
parents 609c060fd2a2
children c9b51268668f
comparison
equal deleted inserted replaced
1134:55a86cfe6277 1135:cf6133247d34
518 #endif 518 #endif
519 } 519 }
520 520
521 static int DSp_VideoInit(_THIS, SDL_PixelFormat *vformat) 521 static int DSp_VideoInit(_THIS, SDL_PixelFormat *vformat)
522 { 522 {
523 NumVersion dsp_version; 523 NumVersion dsp_version = { 0x01, 0x00, 0x00, 0x00 };
524 524
525 #if UNIVERSAL_INTERFACES_VERSION > 0x0320
525 dsp_version = DSpGetVersion (); 526 dsp_version = DSpGetVersion ();
527 #endif
526 528
527 if ( (dsp_version.majorRev == 1 && dsp_version.minorAndBugRev < 0x73) || 529 if ( (dsp_version.majorRev == 1 && dsp_version.minorAndBugRev < 0x73) ||
528 (dsp_version.majorRev < 1) ) { 530 (dsp_version.majorRev < 1) ) {
529 531
530 /* StandardAlert (kAlertStopAlert, "\pError!", 532 /* StandardAlert (kAlertStopAlert, "\pError!",
799 attrib.displayDepthMask = kDSpDepthMask_All; 801 attrib.displayDepthMask = kDSpDepthMask_All;
800 attrib.backBufferDepthMask = kDSpDepthMask_All; 802 attrib.backBufferDepthMask = kDSpDepthMask_All;
801 attrib.colorNeeds = kDSpColorNeeds_Require; 803 attrib.colorNeeds = kDSpColorNeeds_Require;
802 attrib.colorTable = 0; 804 attrib.colorTable = 0;
803 attrib.pageCount = page_count; 805 attrib.pageCount = page_count;
804 #if TARGET_API_MAC_OSX 806 #if TARGET_API_MAC_OSX || UNIVERSAL_INTERFACES_VERSION == 0x0320
805 807
806 if ( DSpFindBestContext (&attrib, &dsp_context) != noErr ) { 808 if ( DSpFindBestContext (&attrib, &dsp_context) != noErr ) {
807 SDL_SetError ("DrawSprocket couldn't find a context"); 809 SDL_SetError ("DrawSprocket couldn't find a context");
808 return NULL; 810 return NULL;
809 } 811 }