From 2ec608f0598925c874441ac2bcdfe4af2296bf7c Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 13 May 2020 16:43:59 +0200 Subject: [PATCH] DolphinQt: Set block size to 128 KiB by default --- Source/Core/DolphinQt/ConvertDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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> 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)