Mercurial > sdl-ios-xcode
diff src/video/photon/SDL_phyuv.c @ 753:b14fdadd8311
Date: Thu, 4 Dec 2003 07:48:40 +0200
From: "Mike Gorchak"
Subject: SDL/QNX6 new patch
Here in attachment my patch for the SDL/QNX6 again :) It contain non-crtitical/cosmetic fixes:
1. Fixed window centering at other than the first consoles.
2. Fixed window centering algorithm in case when window height or width are greater than the desktop resolution.
3. Fixed window positioning on other than the first consoles.
4. Fixed occasional input focus lost when switching to fullscreen.
5. Removed the Photon's default chroma color for the overlays, added RGB(12, 6, 12) color instead (very dark pink).
6. Added more checks to the YUV overlay code (fixed crashes during resolution mode switches).
7. Added support for Enter/Backspace keys in unicode mode (used by Maelstrom and by other games).
8. Fixed window restore/maximize function. It works, finally.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 10 Dec 2003 12:35:56 +0000 |
parents | 8bedd6d61642 |
children | b8d311d90021 |
line wrap: on
line diff
--- a/src/video/photon/SDL_phyuv.c Wed Dec 10 12:32:38 2003 +0000 +++ b/src/video/photon/SDL_phyuv.c Wed Dec 10 12:35:56 2003 +0000 @@ -182,7 +182,9 @@ overlay->hwdata->props.src_dim.w = width; overlay->hwdata->props.src_dim.h = height; - overlay->hwdata->chromakey = PgGetOverlayChromaColor(); + /* overlay->hwdata->chromakey = PgGetOverlayChromaColor(); */ + overlay->hwdata->chromakey = PgRGB(12, 6, 12); /* very dark pink color */ + overlay->hwdata->props.color_key = overlay->hwdata->chromakey; PhAreaToRect(&overlay->hwdata->CurrentViewPort, &overlay->hwdata->props.viewport); @@ -191,6 +193,7 @@ if ((overlay->hwdata->ischromakey)&&(overlay->hwdata->chromakey)) { overlay->hwdata->props.flags |= Pg_SCALER_PROP_CHROMA_ENABLE; + overlay->hwdata->props.flags |= Pg_SCALER_PROP_CHROMA_SPECIFY_KEY_MASK; } else { @@ -286,7 +289,7 @@ { if (overlay == NULL) { - return 0; + return -1; } overlay->hwdata->locked = 1; @@ -332,7 +335,7 @@ { if (overlay == NULL) { - return; + return; } overlay->hwdata->locked = 0; @@ -406,9 +409,9 @@ switch(rtncode) { case -1: - SDL_SetError("PgConfigScalerChannel failed\n"); + SDL_SetError("PgConfigScalerChannel() function failed\n"); SDL_FreeYUVOverlay(overlay); - return (0); + return -1; case 1: grab_ptrs2(overlay->hwdata->channel, overlay->hwdata->FrameData0, overlay->hwdata->FrameData1); break;