Merge pull request #6109 from driver1998/buildfix

Fix building on MSYS2 with QT6
This commit is contained in:
Miran Grča
2025-08-30 21:06:13 +02:00
committed by GitHub
3 changed files with 6 additions and 3 deletions

View File

@@ -381,7 +381,7 @@ MediaHistoryManager::removeMissingImages(device_index_list_t &device_history)
#ifdef Q_OS_WINDOWS
if (new_fi.filePath().left(8) == "ioctl://")
file_exists = (GetDriveType(new_fi.filePath().right(2).toUtf8().data()) == DRIVE_CDROM);
file_exists = (GetDriveTypeA(new_fi.filePath().right(2).toUtf8().data()) == DRIVE_CDROM);
#endif
if (!file_exists) {

View File

@@ -31,7 +31,6 @@
extern "C" {
#ifdef Q_OS_WINDOWS
#define BITMAP WINDOWS_BITMAP
#undef UNICODE
#include <windows.h>
#include <windowsx.h>
#undef BITMAP
@@ -176,7 +175,7 @@ MediaMenu::refresh(QMenu *parentMenu)
it's a CDROM */
for (const auto &letter : driveLetters) {
auto drive = QString("%1:\\").arg(letter);
if (GetDriveType(drive.toUtf8().constData()) == DRIVE_CDROM)
if (GetDriveTypeA(drive.toUtf8().constData()) == DRIVE_CDROM)
menu->addAction(QIcon(":/settings/qt/icons/cdrom_host.ico"), tr("&Host CD/DVD Drive (%1:)").arg(letter), [this, i, letter] { cdromMount(i, 2, QString(R"(\\.\%1:)").arg(letter)); })->setCheckable(false);
}
menu->addSeparator();

View File

@@ -62,6 +62,10 @@
# include <CoreGraphics/CoreGraphics.h>
#endif
#ifdef Q_OS_WINDOWS
# include <windows.h>
#endif
extern "C" {
#include <86box/86box.h>
#include <86box/config.h>