]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/filethread.cpp
More ROM picker refinements...
[virtualjaguar] / src / gui / filethread.cpp
index 1f5a5aab51223e50e6d11af57d6a4f6b4c8d3214..8bb2b87b70f4edda23d8acd3369b9ebc136ee784 100644 (file)
@@ -133,10 +133,22 @@ void FileThread::run(void)
        QDir romDir(vjs.ROMPath);
        QFileInfoList list = romDir.entryInfoList();
 
+/*
+Another thing we'll probably have to do here is check for compressed files and
+decompress/fish around in them to find what we need. :-P
+*/
+
        for(int i=0; i<list.size(); i++)
        {
                if (abort)
+#if 1
+{
+printf("FileThread: Aborting!!!\n");
+#endif
                        return;
+#if 1
+}
+#endif
 
                QFileInfo fileInfo = list.at(i);
                QFile file(romDir.filePath(fileInfo.fileName()));
@@ -155,7 +167,7 @@ void FileThread::run(void)
                        {
 printf("FileThread: Found match [%s]...\n", romList[index].name);
                                new QListWidgetItem(QIcon(":/res/generic.png"), romList[index].name, listWidget);
-//                             break;
+                               emit FoundAFile(romList[index].crc32);
                        }
                }
 
@@ -164,7 +176,8 @@ printf("FileThread: Found match [%s]...\n", romList[index].name);
 }
 
 //
-// Find a CRC in the ROM list. If it's there, return the index, otherwise return $FFFFFFFF
+// Find a CRC in the ROM list (simple brute force algorithm).
+// If it's there, return the index, otherwise return $FFFFFFFF
 //
 uint32 FileThread::FindCRCIndexInFileList(uint32 crc)
 {