comparison src/video/quartz/SDL_QuartzVideo.m @ 1487:dc6b59e925a2

Cleaning up warnings on MacOS X
author Sam Lantinga <slouken@libsdl.org>
date Thu, 09 Mar 2006 06:33:21 +0000
parents 376665398b25
children 8d9bb0cf2c2a
comparison
equal deleted inserted replaced
1486:9d77fc9d0ace 1487:dc6b59e925a2
680 CGReleaseDisplayFadeReservation (fade_token); 680 CGReleaseDisplayFadeReservation (fade_token);
681 } 681 }
682 return NULL; 682 return NULL;
683 } 683 }
684 684
685 //[ qz_window setReleasedWhenClosed:YES ]; 685 /*[ qz_window setReleasedWhenClosed:YES ];*/
686 QZ_SetCaption(this, this->wm_title, this->wm_icon); 686 QZ_SetCaption(this, this->wm_title, this->wm_icon);
687 [ qz_window setAcceptsMouseMovedEvents:YES ]; 687 [ qz_window setAcceptsMouseMovedEvents:YES ];
688 [ qz_window setViewsNeedDisplay:NO ]; 688 [ qz_window setViewsNeedDisplay:NO ];
689 if ( center_window ) { 689 if ( center_window ) {
690 [ qz_window center ]; 690 [ qz_window center ];
757 int vOffset = [ qz_window frame ].size.height - 757 int vOffset = [ qz_window frame ].size.height -
758 [ window_view frame ].size.height - [ window_view frame ].origin.y; 758 [ window_view frame ].size.height - [ window_view frame ].origin.y;
759 759
760 int hOffset = [ window_view frame ].origin.x; 760 int hOffset = [ window_view frame ].origin.x;
761 761
762 current->pixels += (vOffset * current->pitch) + hOffset * (qdbpp/8); 762 current->pixels = (Uint8 *)current->pixels + (vOffset * current->pitch) + hOffset * (qdbpp/8);
763 } 763 }
764 this->UpdateRects = QZ_UpdateRects; 764 this->UpdateRects = QZ_UpdateRects;
765 this->LockHWSurface = QZ_LockWindow; 765 this->LockHWSurface = QZ_LockWindow;
766 this->UnlockHWSurface = QZ_UnlockWindow; 766 this->UnlockHWSurface = QZ_UnlockWindow;
767 } 767 }
919 * We have to add SDL_VideoSurface->offset here, since we might be a 919 * We have to add SDL_VideoSurface->offset here, since we might be a
920 * smaller surface in the center of the framebuffer (you asked for 920 * smaller surface in the center of the framebuffer (you asked for
921 * a fullscreen resolution smaller than the hardware could supply 921 * a fullscreen resolution smaller than the hardware could supply
922 * so SDL is centering it in a bigger resolution)... 922 * so SDL is centering it in a bigger resolution)...
923 */ 923 */
924 dst = CGDisplayBaseAddress (display_id) + SDL_VideoSurface->offset; 924 dst = (Uint8 *)CGDisplayBaseAddress (display_id) + SDL_VideoSurface->offset;
925 src = current_buffer + SDL_VideoSurface->offset; 925 src = current_buffer + SDL_VideoSurface->offset;
926 len = SDL_VideoSurface->w * SDL_VideoSurface->format->BytesPerPixel; 926 len = SDL_VideoSurface->w * SDL_VideoSurface->format->BytesPerPixel;
927 h = SDL_VideoSurface->h; 927 h = SDL_VideoSurface->h;
928 skip = SDL_VideoSurface->pitch; 928 skip = SDL_VideoSurface->pitch;
929 929
1023 /* 1023 /*
1024 The obscured code is based on work by Matt Slot fprefect@ambrosiasw.com, 1024 The obscured code is based on work by Matt Slot fprefect@ambrosiasw.com,
1025 who supplied sample code for Carbon. 1025 who supplied sample code for Carbon.
1026 */ 1026 */
1027 1027
1028 //#define TEST_OBSCURED 1 1028 /*#define TEST_OBSCURED 1*/
1029 1029
1030 #if TEST_OBSCURED 1030 #if TEST_OBSCURED
1031 #include "CGS.h" 1031 #include "CGS.h"
1032 #endif 1032 #endif
1033 1033
1073 CGSWindowLevel winLevel; 1073 CGSWindowLevel winLevel;
1074 CGSRect winRect; 1074 CGSRect winRect;
1075 1075
1076 CGSRect contentRect; 1076 CGSRect contentRect;
1077 int windowNumber; 1077 int windowNumber;
1078 //int isMainWindow;
1079 int firstDockIcon; 1078 int firstDockIcon;
1080 int dockIconCacheMiss; 1079 int dockIconCacheMiss;
1081 int windowContentOffset; 1080 int windowContentOffset;
1082 1081
1083 int obscured = SDL_TRUE; 1082 int obscured = SDL_TRUE;
1104 windowContentOffset = 22; 1103 windowContentOffset = 22;
1105 else 1104 else
1106 windowContentOffset = 0; 1105 windowContentOffset = 0;
1107 1106
1108 windowNumber = [ window windowNumber ]; 1107 windowNumber = [ window windowNumber ];
1109 //isMainWindow = [ window isMainWindow ];
1110 1108
1111 /* The window list is sorted according to order on the screen */ 1109 /* The window list is sorted according to order on the screen */
1112 count = 0; 1110 count = 0;
1113 CGSGetOnScreenWindowList (cgsConnection, 0, kMaxWindows, windows, &count); 1111 CGSGetOnScreenWindowList (cgsConnection, 0, kMaxWindows, windows, &count);
1114 CGSGetScreenRectForWindow (cgsConnection, windowNumber, &contentRect); 1112 CGSGetScreenRectForWindow (cgsConnection, windowNumber, &contentRect);