diff options
| author | JosJuice <josjuice@gmail.com> | 2020-05-13 16:43:59 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-06-17 13:48:45 +0200 |
| commit | 2ec608f0598925c874441ac2bcdfe4af2296bf7c (patch) | |
| tree | ba42ad87604a3f09c76e0d9dbd0b9e499b524599 /Source/Core/DolphinQt/ConvertDialog.cpp | |
| parent | 3f753fc87d456c482e847c7de99c7ccd3b758f08 (diff) | |
DolphinQt: Set block size to 128 KiB by default
Diffstat (limited to 'Source/Core/DolphinQt/ConvertDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/ConvertDialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/ConvertDialog.cpp b/Source/Core/DolphinQt/ConvertDialog.cpp index 7639c78b8a..a587af0deb 100644 --- a/Source/Core/DolphinQt/ConvertDialog.cpp +++ b/Source/Core/DolphinQt/ConvertDialog.cpp @@ -131,6 +131,12 @@ ConvertDialog::ConvertDialog(QList<std::shared_ptr<const UICommon::GameFile>> fi void ConvertDialog::AddToBlockSizeComboBox(int size) { m_block_size->addItem(QString::fromStdString(UICommon::FormatSize(size, 0)), size); + + // Select 128 KiB by default, or if it is not available, the size closest to it. + // This code assumes that sizes get added to the combo box in increasing order. + constexpr int DEFAULT_SIZE = 0x20000; + if (size <= DEFAULT_SIZE) + m_block_size->setCurrentIndex(m_block_size->count() - 1); } void ConvertDialog::AddToCompressionComboBox(const QString& name, DiscIO::WIACompressionType type) |
