]> granicus.if.org Git - nethack/commitdiff
(Qt) Old version support
authorwarwick <warwick>
Fri, 18 Jan 2002 08:47:28 +0000 (08:47 +0000)
committerwarwick <warwick>
Fri, 18 Jan 2002 08:47:28 +0000 (08:47 +0000)
Workarounds for Qt 2.1.0beta4 (?)

win/Qt/qt_win.cpp

index 81ce7bc4c4e6433f85008983e549bc60320afc42..6716c9b787312170d653464fb1aea57fc245222d 100644 (file)
@@ -110,8 +110,19 @@ extern "C" {
 #include <unistd.h>
 #endif
 
+// Some distributors released Qt 2.1.0beta4
+#if QT_VERSION < 220
+# define nh_WX11BypassWM 0x01000000
+#else
+# define nh_WX11BypassWM WX11BypassWM
+#endif
+
 #ifdef USER_SOUNDS
-#include <qsound.h>
+# if QT_VERSION < 220
+#  undef USER_SOUNDS
+# else
+#  include <qsound.h>
+# endif
 #endif
 
 
@@ -4308,7 +4319,7 @@ NetHackQtBind::NetHackQtBind(int& argc, char** argv) :
     QPixmap pm("nhsplash.xpm");
     if ( !pm.isNull() ) {
        QVBox *vb = new QVBox(0,0,
-           WStyle_Customize | WStyle_NoBorder | WX11BypassWM | WStyle_StaysOnTop );
+           WStyle_Customize | WStyle_NoBorder | nh_WX11BypassWM | WStyle_StaysOnTop );
        splash = vb;
        QLabel *lsplash = new QLabel(vb);
        lsplash->setAlignment(AlignCenter);