Fix compile on Qt 4
This commit is contained in:
@@ -145,7 +145,9 @@ ifdef WANT_WIN_QT
|
|||||||
WINCFLAGS += -DQT_GRAPHICS
|
WINCFLAGS += -DQT_GRAPHICS
|
||||||
WINSRC += $(WINQTSRC)
|
WINSRC += $(WINQTSRC)
|
||||||
WINOBJ0 += $(WINQTOBJ)
|
WINOBJ0 += $(WINQTOBJ)
|
||||||
|
ifndef WANT_WIN_QT4
|
||||||
SNDCFLAGS += -DSND_LIB_QTSOUND
|
SNDCFLAGS += -DSND_LIB_QTSOUND
|
||||||
|
endif #! WANT_WIN_QT4
|
||||||
HAVE_SNDLIB = 1
|
HAVE_SNDLIB = 1
|
||||||
NEEDS_SND_USERSOUNDS = 1
|
NEEDS_SND_USERSOUNDS = 1
|
||||||
NEEDS_SND_SEAUTOMAP = 1
|
NEEDS_SND_SEAUTOMAP = 1
|
||||||
|
|||||||
+2
-9
@@ -1043,7 +1043,7 @@ boolean NetHackQtBind::msgs_initd = false;
|
|||||||
static void Qt_positionbar(char *) {}
|
static void Qt_positionbar(char *) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SND_LIB_QTSOUND) && !defined(NO_QT_SOUND)
|
#if defined(SND_LIB_QTSOUND) && !defined(QT_NO_SOUND)
|
||||||
void NetHackQtBind::qtsound_init_nhsound(void)
|
void NetHackQtBind::qtsound_init_nhsound(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -1069,15 +1069,11 @@ void NetHackQtBind::qtsound_ambience(int32_t ambienceid UNUSED, int32_t ambience
|
|||||||
void NetHackQtBind::qtsound_verbal(char *text UNUSED, int32_t gender UNUSED, int32_t tone UNUSED, int32_t vol UNUSED, int32_t moreinfo UNUSED)
|
void NetHackQtBind::qtsound_verbal(char *text UNUSED, int32_t gender UNUSED, int32_t tone UNUSED, int32_t vol UNUSED, int32_t moreinfo UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(USER_SOUNDS) && !defined(QT_NO_SOUND)
|
|
||||||
QSoundEffect *effect = NULL;
|
QSoundEffect *effect = NULL;
|
||||||
#endif
|
|
||||||
|
|
||||||
void NetHackQtBind::qtsound_play_usersound(char *filename, int32_t volume, int32_t idx UNUSED)
|
void NetHackQtBind::qtsound_play_usersound(char *filename, int32_t volume, int32_t idx UNUSED)
|
||||||
{
|
{
|
||||||
#if defined(USER_SOUNDS) && !defined(QT_NO_SOUND)
|
|
||||||
if (!effect)
|
if (!effect)
|
||||||
effect = new QSoundEffect(nethack_qt_::NetHackQtBind::mainWidget());
|
effect = new QSoundEffect(nethack_qt_::NetHackQtBind::mainWidget());
|
||||||
if (effect) {
|
if (effect) {
|
||||||
@@ -1086,11 +1082,8 @@ void NetHackQtBind::qtsound_play_usersound(char *filename, int32_t volume, int32
|
|||||||
effect->setSource(QUrl::fromLocalFile(filename));
|
effect->setSource(QUrl::fromLocalFile(filename));
|
||||||
effect->play();
|
effect->play();
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
nhUse(filename);
|
|
||||||
nhUse(volume);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace nethack_qt_
|
} // namespace nethack_qt_
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user