Make sure that floppy icons and options do not appear if there's no floppy controller available

This commit is contained in:
Cacodemon345
2025-04-02 01:10:21 +06:00
parent b644016d1e
commit 5e61b78b78
2 changed files with 11 additions and 0 deletions

View File

@@ -40,6 +40,8 @@ extern "C" {
#include <86box/ui.h>
#include <86box/machine_status.h>
#include <86box/config.h>
extern volatile int fdcinited;
};
#include <QIcon>
@@ -303,6 +305,9 @@ MachineStatus::hasSCSI()
void
MachineStatus::iterateFDD(const std::function<void(int)> &cb)
{
if (!fdcinited)
return;
for (int i = 0; i < FDD_NUM; ++i) {
if (fdd_get_type(i) != 0) {
cb(i);