QT render stack: add a missing default entry. Also committing the missing MO image creation fixes.
This commit is contained in:
@@ -367,7 +367,7 @@ NewFloppyDialog::create86f(const QString &filename, const disk_size_t &disk_size
|
||||
bool
|
||||
NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t &disk_size, FileType type)
|
||||
{
|
||||
uint32_t total_size = 0;
|
||||
uint64_t total_size = 0;
|
||||
uint32_t total_sectors = 0;
|
||||
uint32_t sector_bytes = 0;
|
||||
uint32_t root_dir_bytes = 0;
|
||||
@@ -388,7 +388,7 @@ NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t &d
|
||||
total_sectors = disk_size.sides * disk_size.tracks * disk_size.sectors;
|
||||
if (total_sectors > ZIP_SECTORS)
|
||||
total_sectors = ZIP_250_SECTORS;
|
||||
total_size = total_sectors * sector_bytes;
|
||||
total_size = (uint64_t) total_sectors * sector_bytes;
|
||||
root_dir_bytes = (disk_size.root_dir_entries << 5);
|
||||
fat_size = (disk_size.spfat * sector_bytes);
|
||||
fat1_offs = sector_bytes;
|
||||
@@ -465,11 +465,11 @@ NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t &d
|
||||
bool
|
||||
NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_size_t &disk_size, FileType type, QProgressDialog &pbar)
|
||||
{
|
||||
uint32_t total_size = 0;
|
||||
uint64_t total_size = 0;
|
||||
uint32_t total_sectors = 0;
|
||||
uint32_t sector_bytes = 0;
|
||||
uint16_t base = 0x1000;
|
||||
uint32_t pbar_max = 0;
|
||||
uint64_t pbar_max = 0;
|
||||
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::WriteOnly)) {
|
||||
@@ -482,7 +482,7 @@ NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_size_t
|
||||
total_sectors = disk_size.sides * disk_size.tracks * disk_size.sectors;
|
||||
if (total_sectors > ZIP_SECTORS)
|
||||
total_sectors = ZIP_250_SECTORS;
|
||||
total_size = total_sectors * sector_bytes;
|
||||
total_size = (uint64_t) total_sectors * sector_bytes;
|
||||
|
||||
pbar_max = total_size;
|
||||
if (type == FileType::Zdi) {
|
||||
@@ -649,12 +649,12 @@ bool
|
||||
NewFloppyDialog::createMoSectorImage(const QString &filename, int8_t disk_size, FileType type, QProgressDialog &pbar)
|
||||
{
|
||||
const mo_type_t *dp = &mo_types[disk_size];
|
||||
uint32_t total_size = 0;
|
||||
uint32_t total_size2;
|
||||
uint64_t total_size = 0;
|
||||
uint64_t total_size2;
|
||||
uint32_t total_sectors = 0;
|
||||
uint32_t sector_bytes = 0;
|
||||
uint16_t base = 0x1000;
|
||||
uint32_t pbar_max = 0;
|
||||
uint64_t pbar_max = 0;
|
||||
uint32_t blocks_num;
|
||||
|
||||
QFile file(filename);
|
||||
@@ -666,7 +666,7 @@ NewFloppyDialog::createMoSectorImage(const QString &filename, int8_t disk_size,
|
||||
|
||||
sector_bytes = dp->bytes_per_sector;
|
||||
total_sectors = dp->sectors;
|
||||
total_size = total_sectors * sector_bytes;
|
||||
total_size = (uint64_t) total_sectors * sector_bytes;
|
||||
|
||||
total_size2 = (total_size >> 20) << 20;
|
||||
total_size2 = total_size - total_size2;
|
||||
|
||||
@@ -549,6 +549,9 @@ RendererStack::event(QEvent* event)
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
default:
|
||||
return QStackedWidget::event(event);
|
||||
}
|
||||
|
||||
return QStackedWidget::event(event);
|
||||
|
||||
Reference in New Issue
Block a user