+ else
+ {
+ // We should try to be intelligent with our updates here, and only redraw when
+ // we're going from a selection with a label to a selection without. Now, we
+ // redraw regardless.
+ QImage cart;
+
+// We now have to sources of data for the passed in files:
+// - The file DB
+// - The file type detection
+// This means we have to be mindful of what's passed back by that stuff.
+// We can assume that if it wasn't found in the DB, then the fileType
+// should be valid.
+// The DB takes precedence over the fileType.
+ if ((!haveUnknown && (romList[i].flags & FF_ROM))
+ || (haveUnknown && (fileType == JST_ROM) && !haveUniversalHeader))
+ {
+ cart = QImage(":/res/cart-blank.png");
+ QPainter painter(&cart);
+ painter.drawPixmap(27, 89, QPixmap::fromImage(QImage(":/res/label-blank.png")));
+ painter.end();
+ }
+ else if ((!haveUnknown && (romList[i].flags & FF_ALPINE))
+ || (haveUnknown
+ && ((fileType == JST_ALPINE) || ((fileType == JST_ROM) && haveUniversalHeader))))
+ {
+ if (haveUniversalHeader)
+ cart = QImage(":/res/skunkboard-file.png");
+ else
+ cart = QImage(":/res/alpine-file.png");
+ }
+ else if (haveUnknown && (fileType == JST_ABS_TYPE1 || fileType == JST_ABS_TYPE2
+ || fileType == JST_JAGSERVER))
+ {
+ cart = QImage(":/res/homebrew-file.png");
+ }
+ else
+ cart = QImage(":/res/unknown-file.png");
+
+ cartImage->setPixmap(QPixmap::fromImage(cart));
+ }
+
+//1048576
+//2097152
+//4194304
+ if (!haveUnknown)
+ prettyFilename = romList[i].name;
+ else
+ {
+ int lastSlashPos = currentFile.lastIndexOf('/');
+ prettyFilename = "\"" + currentFile.mid(lastSlashPos + 1) + "\"";
+ }
+
+ title->setText(QString("<h2>%1</h2>").arg(prettyFilename));
+
+//Kludge for now, we'll have to fix this later...
+// So let's fix it now!
+ QString fileTypeString, crcString, notes, compatibility;
+
+#if 0
+ if (!haveUnknown)
+ {
+ if (romList[i].flags & FF_ROM)
+ fileTypeString = QString(tr("%1MB Cartridge")).arg(fileSize / 1048576);
+ else if (romList[i].flags & FF_ALPINE)
+ fileTypeString = QString(tr("%1MB Alpine ROM")).arg(fileSize / 1048576);
+ else
+ fileTypeString = QString(tr("*** UNKNOWN *** (%1 bytes)")).arg(fileSize);
+ }
+#else
+ if ((!haveUnknown && (romList[i].flags & FF_ROM))
+ || (haveUnknown && (fileType == JST_ROM) && !haveUniversalHeader))
+ fileTypeString = QString(tr("%1MB Cartridge")).arg(fileSize / 1048576);
+ else if ((!haveUnknown && (romList[i].flags & FF_ALPINE))
+ || (haveUnknown
+ && ((fileType == JST_ALPINE) || ((fileType == JST_ROM) && haveUniversalHeader))))
+ {
+ if (haveUniversalHeader)
+ fileTypeString = QString(tr("%1MB Alpine ROM w/Universal Header"));
+ else
+ fileTypeString = QString(tr("%1MB Alpine ROM"));
+
+ fileTypeString = fileTypeString.arg((fileSize + 8192) / 1048576);
+ }
+ else if (haveUnknown && (fileType == JST_ABS_TYPE1 || fileType == JST_ABS_TYPE2))
+ fileTypeString = QString(tr("ABS/COF Executable (%1 bytes)")).arg(fileSize);
+ else if (haveUnknown && (fileType == JST_JAGSERVER))
+ fileTypeString = QString(tr("Jaguar Server Executable (%1 bytes)")).arg(fileSize);
+ else
+ fileTypeString = QString(tr("*** UNKNOWN *** (%1 bytes)")).arg(fileSize);
+#endif
+
+// crcString = QString("%1").arg(romList[i].crc32, 8, 16, QChar('0')).toUpper();
+ crcString = QString("%1").arg(crc, 8, 16, QChar('0')).toUpper();
+
+ if (!haveUnknown && (romList[i].flags & FF_NON_WORKING))
+ compatibility = "DOES NOT WORK";
+ else
+ compatibility = "Unknown";