mirror of
https://github.com/ioquake/launch.git
synced 2025-02-18 01:41:05 +00:00
Windows install from CD: only display CD/DVD drives.
This commit is contained in:
parent
7decc05e07
commit
51ef4403ae
1 changed files with 6 additions and 2 deletions
|
@ -58,8 +58,12 @@ InstallWizard_Setup::InstallWizard_Setup(QWidget *parent, Settings *settings) :
|
||||||
const QString path(drives.at(i).absoluteFilePath());
|
const QString path(drives.at(i).absoluteFilePath());
|
||||||
QString text(path);
|
QString text(path);
|
||||||
|
|
||||||
// Windows: get the volume name. If it's "Quake3", select this drive.
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
|
// Only add CD/DVD volumes.
|
||||||
|
if (GetDriveType((LPCWSTR)path.utf16()) != DRIVE_CDROM)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Get the volume name. If it's "Quake3", select this drive.
|
||||||
WCHAR volumeNameRaw[128];
|
WCHAR volumeNameRaw[128];
|
||||||
|
|
||||||
if (GetVolumeInformation((LPCWSTR)path.utf16(), volumeNameRaw, sizeof(volumeNameRaw), NULL, NULL, NULL, NULL, 0))
|
if (GetVolumeInformation((LPCWSTR)path.utf16(), volumeNameRaw, sizeof(volumeNameRaw), NULL, NULL, NULL, NULL, 0))
|
||||||
|
@ -72,7 +76,7 @@ InstallWizard_Setup::InstallWizard_Setup(QWidget *parent, Settings *settings) :
|
||||||
|
|
||||||
if (volumeName == "Quake3")
|
if (volumeName == "Quake3")
|
||||||
{
|
{
|
||||||
selectIndex = i;
|
selectIndex = ui->cbInstallSource->count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue