From c0ccac31da51759902e8060217025732957a9626 Mon Sep 17 00:00:00 2001 From: Yann Boucher <yann.boucher@etu.utc.fr> Date: Wed, 9 Jun 2021 20:10:27 +0200 Subject: [PATCH] Actually bad apple doesn't work that well lol --- src/interface.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/interface.cpp b/src/interface.cpp index 8236835..bb921c9 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -632,7 +632,10 @@ QJsonObject MainWindow::default_configuration() const return doc.object(); } -#ifdef _WIN32 +// Décommenter pour activer le son sur win +//#define BAD_APPLE_WIN + +#if defined(BAD_APPLE_WIN) #include <windows.h> #endif @@ -695,10 +698,10 @@ void MainWindow::play_bad_apple() //bad_apple_player.play(); ; -#ifdef _WIN32 +#ifdef BAD_APPLE_WIN PlaySound(TEXT("extras/bad-apple.wav"), GetModuleHandle(NULL), SND_FILENAME | SND_ASYNC); Sleep(1300); // delay for the sound to load -#elif +#else QMessageBox::information(this, "", "Music functionnality is only available on Windows"); #endif -- GitLab