No go here (Re: [D3D] Added native and emulated S3TC support (take 2))
Lionel Ulmer
lionel.ulmer at free.fr
Sat Jul 31 07:49:53 CDT 2004
> Oh, wait... just when I *wanted* to say it works, I switched back to the
> console compiling Wine, and:
Oh well, just an include missing somewhere. Revised patch attached to this
mail (same Changelog as before).
Changelog:
- fix compilation on boxes without OpenGL installed
- print warning message about missing DXTC library only once
Lionel
--
Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/ddraw/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/main.c,v
retrieving revision 1.41
diff -u -r1.41 main.c
--- dlls/ddraw/main.c 30 Jul 2004 18:54:32 -0000 1.41
+++ dlls/ddraw/main.c 31 Jul 2004 12:43:12 -0000
@@ -43,6 +43,7 @@
/* This for all the enumeration and creation of D3D-related objects */
#include "ddraw_private.h"
+#include "d3d_private.h"
#include "wine/debug.h"
#include "wine/library.h"
Index: dlls/ddraw/ddraw/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/main.c,v
retrieving revision 1.49
diff -u -r1.49 main.c
--- dlls/ddraw/ddraw/main.c 30 Jul 2004 18:54:32 -0000 1.49
+++ dlls/ddraw/ddraw/main.c 31 Jul 2004 12:43:13 -0000
@@ -380,6 +380,7 @@
ddsd.u4.ddpfPixelFormat = This->pixelformat;
}
+#ifdef HAVE_OPENGL
/* We support for now only DXT1, DXT3 & DXT5 compressed texture formats... */
if ((ddsd.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC) &&
(ddsd.u4.ddpfPixelFormat.dwFourCC != MAKE_FOURCC('D','X','T','1')) &&
@@ -392,10 +393,20 @@
/* Check if we can really support DXT1, DXT3 & DXT5 */
if ((ddsd.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC) &&
!GL_extensions.s3tc_compressed_texture && !s3tc_initialized) {
- ERR("Trying to create DXT1, DXT3 or DXT5 texture which is not supported by the video card!!!\n");
- ERR("However there is a library libtxc_dxtn.so that can be used to do the software decompression...\n");
+ static BOOLEAN user_warned = 0;
+ if (user_warned == 0) {
+ ERR("Trying to create DXT1, DXT3 or DXT5 texture which is not supported by the video card!!!\n");
+ ERR("However there is a library libtxc_dxtn.so that can be used to do the software decompression...\n");
+ user_warned = 1;
+ }
return DDERR_INVALIDPIXELFORMAT;
}
+#else
+ if (ddsd.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC)
+ {
+ return DDERR_INVALIDPIXELFORMAT;
+ }
+#endif
if (!(ddsd.dwFlags & DDSD_PITCH))
{
More information about the wine-patches
mailing list