# HG changeset patch # User alex # Date 1053711573 0 # Node ID 2f9e8ff57e9e2332a6eb68f8784fcfb893ea76f8 # Parent 46badb3d0b1c44af610619627c8bf58b62148d2a This could be a 10l, but the codes check later if the wsConvFunc is valid, so no sig11 if it's NULL, but at least no XShape support on PPC :) After all, finally the GUI works on my PPC!%#^^ diff -r 46badb3d0b1c -r 2f9e8ff57e9e Gui/wm/ws.c --- a/Gui/wm/ws.c Fri May 23 17:23:35 2003 +0000 +++ b/Gui/wm/ws.c Fri May 23 17:39:33 2003 +0000 @@ -22,6 +22,8 @@ #include "../../libvo/x11_common.h" #include "ws.h" #include "wsxdnd.h" +#include "../../cpudetect.h" +#include "../../postproc/swscale.h" #include "../../postproc/rgb2rgb.h" #include "../../mp_msg.h" #include "../../mplayer.h" @@ -81,6 +83,13 @@ // --- +static int get_sws_cpuflags() +{ + return (gCpuCaps.hasMMX ? SWS_CPU_CAPS_MMX : 0) | + (gCpuCaps.hasMMX2 ? SWS_CPU_CAPS_MMX2 : 0) | + (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0); +} + #define PACK_RGB16(r,g,b,pixel) pixel=(b>>3);\ pixel<<=6;\ pixel|=(g>>2);\ @@ -281,6 +290,7 @@ wsConvFunc=rgb32tobgr15; break; } + sws_rgb2rgb_init(get_sws_cpuflags()); XSetErrorHandler( wsErrorHandler ); }