X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfxvideo%2Fdraw.c;h=e68f1a19ed23597fd352ee407406cc7861467091;hp=34a86358161f8066d3f2d72e5a5810867e1b4c79;hb=HEAD;hpb=e906c010e1bea71ed4df425be97ce45dc777818c diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c index 34a86358..e68f1a19 100644 --- a/plugins/dfxvideo/draw.c +++ b/plugins/dfxvideo/draw.c @@ -17,17 +17,15 @@ #define _IN_DRAW -#include "externals.h" +#include +#include +#include + #include "gpu.h" -#include "draw.h" -#include "prim.h" -#include "menu.h" -#include "interp.h" -#include "swap.h" // misc globals -int iResX; -int iResY; +int iResX=640; +int iResY=480; long lLowerpart; BOOL bIsFirstFrame = TRUE; BOOL bCheckMask = FALSE; @@ -43,6 +41,15 @@ int iFastFwd = 0; int iFVDisplay = 0; PSXPoint_t ptCursorPoint[8]; unsigned short usCursorActive = 0; +unsigned long ulKeybits; + +int iWindowMode=1; +int iColDepth=32; +char szDispBuf[64]; +char szMenuBuf[36]; +char szDebugText[512]; +void InitMenu(void) {} +void CloseMenu(void) {} //unsigned int LUT16to32[65536]; //unsigned int RGBtoYUV[65536]; @@ -63,6 +70,14 @@ int xv_vsync = 0; XShmSegmentInfo shminfo; int finalw,finalh; +typedef struct { +#define MWM_HINTS_DECORATIONS 2 + long flags; + long functions; + long decorations; + long input_mode; +} MotifWmHints; + extern XvImage *XvShmCreateImage(Display*, XvPortID, int, char*, int, int, XShmSegmentInfo*); #include @@ -1038,7 +1053,7 @@ void CreateDisplay(void) //backup YUV mode //hmm, should I bother check guid == 55595659-0000-0010-8000-00aa00389b71? //and check byte order? fo[j].byte_order == LSBFirst -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ if ( fo[j].type == XvYUV && fo[j].bits_per_pixel == 16 && fo[j].format == XvPacked && strncmp("YUYV", fo[j].component_order, 5) == 0 ) #else if ( fo[j].type == XvYUV && fo[j].bits_per_pixel == 16 && fo[j].format == XvPacked && strncmp("UYVY", fo[j].component_order, 5) == 0 ) @@ -1458,7 +1473,7 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ destpix[row] = Y << 24 | U << 16 | Y << 8 | V; #else destpix[row] = Y << 24 | V << 16 | Y << 8 | U; @@ -1485,7 +1500,7 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ destpix[row] = Y << 24 | U << 16 | Y << 8 | V; #else destpix[row] = Y << 24 | V << 16 | Y << 8 | U; @@ -1519,7 +1534,7 @@ void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d) Y2 = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235); -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ *d = V | Y2 << 8 | U << 16 | Y1 << 24; #else *d = U | Y1 << 8 | V << 16 | Y2 << 24; @@ -1529,7 +1544,7 @@ void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d) } } -extern time_t tStart; +time_t tStart; //Note: dest x,y,w,h are both input and output variables inline void MaintainAspect(unsigned int *dx,unsigned int *dy,unsigned int *dw,unsigned int *dh) @@ -1684,6 +1699,7 @@ int Xinitialize() p2XSaIFunc=NULL; +#if 0 if(iUseNoStretchBlt==1) { p2XSaIFunc=Std2xSaI_ex8; @@ -1715,6 +1731,7 @@ int Xinitialize() { p2XSaIFunc=hq3x_32; } +#endif bUsingTWin=FALSE; @@ -1727,7 +1744,7 @@ int Xinitialize() iShowFPS=0; ulKeybits|=KEY_SHOWFPS; szDispBuf[0]=0; - BuildDispMenu(0); + //BuildDispMenu(0); } return 0; @@ -1847,6 +1864,7 @@ void ShowTextGpuPic(void) { } +#if 0 static void hq2x_32_def(uint32_t * dst0, uint32_t * dst1, const uint32_t * src0, const uint32_t * src1, const uint32_t * src2, unsigned count) { static unsigned char cache_vert_mask[640]; @@ -2045,3 +2063,4 @@ void hq3x_32( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, i hq3x_32_def(dst0, dst1, dst2, src0, src1, src1, width); } +#endif