Mercurial > sdl-ios-xcode
comparison src/video/photon/SDL_phyuv.c @ 380:bce7171e7a85
Date: Wed, 22 May 2002 22:30:58 +0300
From: "Mike Gorchak" <mike@malva.com.ua>
Subject: One more QNX patch
Hi !
- Fixed graywin test application. Added properly support for
window size not equal to 640x480.
- Added support for not aligned pitch of image in SDL_SWSURFACE
and SDL_HWSURFACE. Using Photon builtin alignes.
- Added memory clear after each malloc to avoid problems in the
future :)
- Removed unused variables and static variables, fixed some warnings.
- Updated readme.QNX file.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 28 May 2002 19:31:32 +0000 |
parents | ba72f259bc88 |
children | 8e3ce997621c |
comparison
equal
deleted
inserted
replaced
379:11c8a7684f74 | 380:bce7171e7a85 |
---|---|
208 overlay->hwdata->screen_bpp = 2; | 208 overlay->hwdata->screen_bpp = 2; |
209 overlay->hwdata->scaler_on = FALSE; | 209 overlay->hwdata->scaler_on = FALSE; |
210 overlay->hwdata->screen_width = 1024; | 210 overlay->hwdata->screen_width = 1024; |
211 overlay->hwdata->screen_height = 768; | 211 overlay->hwdata->screen_height = 768; |
212 | 212 |
213 overlay->hwdata->FrameData0 = (FRAMEDATA *) malloc((size_t)(sizeof( FRAMEDATA))); | 213 overlay->hwdata->FrameData0 = (FRAMEDATA *) malloc((size_t)(sizeof(FRAMEDATA))); |
214 overlay->hwdata->FrameData1 = (FRAMEDATA *) malloc((size_t)(sizeof( FRAMEDATA))); | 214 overlay->hwdata->FrameData1 = (FRAMEDATA *) malloc((size_t)(sizeof(FRAMEDATA))); |
215 memset(overlay->hwdata->FrameData0, 0x00, (size_t)(sizeof(FRAMEDATA))); | |
216 memset(overlay->hwdata->FrameData1, 0x00, (size_t)(sizeof(FRAMEDATA))); | |
215 | 217 |
216 overlay->hwdata->caps.size = sizeof(overlay->hwdata->caps); | 218 overlay->hwdata->caps.size = sizeof(overlay->hwdata->caps); |
217 | 219 |
218 //Note you really don't need to do this for SDL as you are given a format, but this is a good example | 220 //Note you really don't need to do this for SDL as you are given a format, but this is a good example |
219 | 221 |
491 } | 493 } |
492 | 494 |
493 //Lock gets the pointer and passes it to the app. The app writes all yuv data into overlay->pixels | 495 //Lock gets the pointer and passes it to the app. The app writes all yuv data into overlay->pixels |
494 //Note this is defined as Uint8 **pixels; /* Read-write */ | 496 //Note this is defined as Uint8 **pixels; /* Read-write */ |
495 overlay->pixels = &overlay->hwdata->CurrentFrameData->Y; | 497 overlay->pixels = &overlay->hwdata->CurrentFrameData->Y; |
496 overlay->pitches = &overlay->hwdata->YStride; | 498 overlay->pitches = (Uint16*) &(overlay->hwdata->YStride); |
497 | 499 |
498 return(0); | 500 return(0); |
499 } | 501 } |
500 | 502 |
501 void ph_UnlockYUVOverlay(_THIS, SDL_Overlay *overlay) | 503 void ph_UnlockYUVOverlay(_THIS, SDL_Overlay *overlay) |