PDA

View Full Version : Building SDL Framework & miniaturize fix


PowerMacX
2004.10.22, 10:13 PM
I'm trying to apply arekkusu's miniaturize fix for OpenGL windows (http://www.idevgames.com/forum/showthread.php?t=5750) to SDL, and to do so I first need to be able to compile SDL from source. The problem I'm having is that Xcode complains about a missing file, SDL_syscdrom_c.h, so I can't even compile the original, unmodified SDL code (1.2.7).

Anyone else had this problem?

The place that will need to be modified with the miniaturize code linked above is

...
@implementation SDL_QuartzWindow

/* we override these methods to fix the miniaturize animation/dock icon bug */
- (void)miniaturize:(id)sender
{
if (SDL_VideoSurface->flags & SDL_OPENGL) {

/*
Future: Grab framebuffer and put into NSImage
[ qz_window setMiniwindowImage:image ];
*/
}
else {

/* make the alpha channel opaque so anim won't have holes in it */
QZ_SetPortAlphaOpaque ();
}

/* window is hidden now */
SDL_PrivateAppActive (0, SDL_APPACTIVE);

[ super miniaturize:sender ];
}
...

in SDL-1.2.7/src/video/quartz/SDL_QuartzWindow.m

If someone can help me find out what is causing SDL compile to fail, I'll (try to) modify this file to miniaturize OpenGL views properly.

arekkusu
2004.10.22, 10:18 PM
I can't help you with the SDL compile, but setMiniwindowImage is not the way to do this. It might actually work in 10.3 but it won't in prior OS versions.

aaronsullivan
2004.10.22, 10:23 PM
I never compiled the 1.2.7 release, but I have compiled the CVS version without a probelm. Maybe you'll have more luck with that?

PowerMacX
2004.10.22, 10:31 PM
OK, I'll try CVS.

I can't help you with the SDL compile, but setMiniwindowImage is not the way to do this. It might actually work in 10.3 but it won't in prior OS versions.

Oh, but that's not my code, that's what the original SDL code looks like.

uDG04 seems to require games to run on 10.3, is there still a lot of people running 10.2? I haven't tested my entry on older OS versions :blush: !