openbsd-ports/graphics/fxtv/patches/patch-tvscreen_c
naddy 87674e8f6a Complete overhaul of this port.
Submitted by Wilbern Cobb <vedge@csoft.org>.
2002-02-02 00:52:18 +00:00

67 lines
2.5 KiB
Plaintext

$OpenBSD: patch-tvscreen_c,v 1.1 2002/02/02 00:52:18 naddy Exp $
--- tvscreen.c.orig Sun May 21 10:49:47 2000
+++ tvscreen.c Wed Aug 15 13:46:30 2001
@@ -763,11 +763,12 @@ static TV_TRANSFER_MODE TVSCREENDetermin
#endif
}
- if ( !set )
+ if ( !set ) {
if ( shimg_sup )
transfer_mode = TV_TRANSFER_SHMEM_IMAGE;
else
transfer_mode = TV_TRANSFER_STD_IMAGE;
+ }
}
assert( transfer_mode );
@@ -1003,11 +1004,12 @@ static void TVSCREENGetCapturePixGeom( T
/* Prefer 2Bpp byte swapped over the rest (since its the */
/* thing NewFrameHdlr currently byte swaps well). */
- else if (( best_pg.Bpp != 2 ) || !best_pg.swap_bytes )
+ else if (( best_pg.Bpp != 2 ) || !best_pg.swap_bytes ) {
if (( pg.Bpp == 2 ) && pg.swap_bytes )
take_it = True;
else if ( pg.Bpp == 2 )
take_it = True;
+ }
if ( take_it ) {
best_i = i;
@@ -1701,7 +1703,7 @@ void TVSCREENVideoWinEventHdlr(
if (( !contin_on || dirvid_allowed ) && RES_MULT_OK(d,c) ) {
if ( TVSCREENVideoStarted() )
TVSCREENStopVideo( False );
-
+
if ( !TVSCREENCapConfigure( d->cap_mode, &cfg_fail_msg ) ){
fprintf( stderr, "TVSCREENCapConfigure() failed: %s\n",
cfg_fail_msg );
@@ -2479,7 +2481,7 @@ static void TVSCREENPrepXImage( TV_DISPL
d->ximage_use_for_expose = FALSE;
/* Free the old */
- if ( image->ximg )
+ if ( image->ximg ) {
if ( image->is_shm ) {
if ( !XShmDetach ( TVDISPLAY, &image->shm_info ) ) {
fprintf( stderr, "XShmDetach() failed\n" );
@@ -2503,6 +2505,7 @@ static void TVSCREENPrepXImage( TV_DISPL
XDestroyImage( image->ximg );
image->ximg = NULL;
}
+ }
/* Create desired new */
if ( c->xfer_mode == TV_TRANSFER_SHMEM_IMAGE ) {
@@ -2587,7 +2590,7 @@ static void TVSCREENPrepXImage( TV_DISPL
static void TVSCREENAllocColorCube( TV_DISPLAY *d,
VL_COLORMAP **cmap )
{
- static Color_cubes[][3] =
+ static int Color_cubes[][3] =
{ {7,7,5},{6,6,6},{6,6,5},{6,6,4},{5,5,5},{5,5,4},{5,5,3},
{4,4,4},{3,3,3},{2,2,2} };