Mercurial > sdl-ios-xcode
diff src/video/quartz/SDL_QuartzWindow.m @ 4204:976bc19f8f6b SDL-1.2
1.2 Quartz video: Ripped out QuickDraw and QuickTime.
Now we use the software path for YUV, and CoreGraphics for 2D stuff.
There are several other 10.6 fixes in here, too...now we can build a 64-bit
SDL for Snow Leopard!
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 21 Sep 2009 06:08:23 +0000 |
parents | a1b03ba2fcd0 |
children | cb44bf8f8a0f |
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzWindow.m Mon Sep 21 04:34:22 2009 +0000 +++ b/src/video/quartz/SDL_QuartzWindow.m Mon Sep 21 06:08:23 2009 +0000 @@ -125,31 +125,6 @@ newViewFrame = [ window_view frame ]; SDL_PrivateResize (newViewFrame.size.width, newViewFrame.size.height); - - /* If not OpenGL, we have to update the pixels and pitch */ - if ( ! ( SDL_VideoSurface->flags & SDL_OPENGL ) ) { - - CGrafPtr thePort = [ window_view qdPort ]; - LockPortBits ( thePort ); - - SDL_VideoSurface->pixels = GetPixBaseAddr ( GetPortPixMap ( thePort ) ); - SDL_VideoSurface->pitch = GetPixRowBytes ( GetPortPixMap ( thePort ) ); - - /* - SDL_VideoSurface->pixels now points to the window's pixels - We want it to point to the *view's* pixels - */ - { - int vOffset = [ qz_window frame ].size.height - - newViewFrame.size.height - newViewFrame.origin.y; - - int hOffset = newViewFrame.origin.x; - - SDL_VideoSurface->pixels = (Uint8 *)SDL_VideoSurface->pixels + (vOffset * SDL_VideoSurface->pitch) + hOffset * (device_bpp/8); - } - - UnlockPortBits ( thePort ); - } } } @@ -183,7 +158,7 @@ SDL_PrivateAppActive (1, SDL_APPACTIVE); } -- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag +- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag { /* Make our window subclass receive these application notifications */ [ [ NSNotificationCenter defaultCenter ] addObserver:self