diff --git a/pcsx2-qt/Settings/CreateMemoryCardDialog.cpp b/pcsx2-qt/Settings/CreateMemoryCardDialog.cpp index b4b36bb475..4b8750891a 100644 --- a/pcsx2-qt/Settings/CreateMemoryCardDialog.cpp +++ b/pcsx2-qt/Settings/CreateMemoryCardDialog.cpp @@ -47,6 +47,10 @@ CreateMemoryCardDialog::CreateMemoryCardDialog(QWidget* parent /* = nullptr */) connect(m_ui.buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, &CreateMemoryCardDialog::close); connect(m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &CreateMemoryCardDialog::restoreDefaults); +#ifdef _WIN32 + m_ui.ntfsCompression->setEnabled(false); +#endif + updateState(); } @@ -96,7 +100,9 @@ void CreateMemoryCardDialog::updateState() const bool okay = (m_ui.name->text().length() > 4); m_ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(okay); +#ifdef _WIN32 m_ui.ntfsCompression->setEnabled(m_type == MemoryCardType::File); +#endif } void CreateMemoryCardDialog::createCard() @@ -117,11 +123,13 @@ void CreateMemoryCardDialog::createCard() return; } +#ifdef _WIN32 if (m_ui.ntfsCompression->isChecked() && m_type == MemoryCardType::File) { const std::string fullPath(Path::CombineStdString(EmuFolders::MemoryCards, nameStr)); NTFS_CompressFile(StringUtil::UTF8StringToWxString(fullPath), true); } +#endif QMessageBox::information(this, tr("Create Memory Card"), tr("Memory card '%1' created.").arg(name)); accept(); diff --git a/pcsx2-qt/Settings/MemoryCardSettingsWidget.h b/pcsx2-qt/Settings/MemoryCardSettingsWidget.h index 8976f86ffc..1a6a45c9e4 100644 --- a/pcsx2-qt/Settings/MemoryCardSettingsWidget.h +++ b/pcsx2-qt/Settings/MemoryCardSettingsWidget.h @@ -39,8 +39,8 @@ public: void refresh(SettingsDialog* dialog); protected: - void mousePressEvent(QMouseEvent* event); - void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event) override; + void mouseMoveEvent(QMouseEvent* event) override; private: QPoint m_dragStartPos = {}; @@ -60,9 +60,9 @@ public: void setCard(const std::optional& name); protected: - void dragEnterEvent(QDragEnterEvent* event); - void dragMoveEvent(QDragMoveEvent* event); - void dropEvent(QDropEvent* event); + void dragEnterEvent(QDragEnterEvent* event) override; + void dragMoveEvent(QDragMoveEvent* event) override; + void dropEvent(QDropEvent* event) override; }; // Must be included *after* the custom widgets. diff --git a/pcsx2-qt/Settings/MemoryCardSettingsWidget.ui b/pcsx2-qt/Settings/MemoryCardSettingsWidget.ui index d291186c2c..e7efe2115d 100644 --- a/pcsx2-qt/Settings/MemoryCardSettingsWidget.ui +++ b/pcsx2-qt/Settings/MemoryCardSettingsWidget.ui @@ -176,7 +176,7 @@ MemoryCardListWidget QTreeWidget -
MemoryCardSettingsWidget.h
+
Settings/MemoryCardSettingsWidget.h