mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Mildly circuitously, accept ROM images.
This commit is contained in:
parent
09059ab869
commit
134a11b948
@ -758,12 +758,13 @@ void MainWindow::dropEvent(QDropEvent* event) {
|
||||
|
||||
QString unusedRoms;
|
||||
for(const auto &url: event->mimeData()->urls()) {
|
||||
const char *const name = url.toLocalFile().toUtf8();
|
||||
FILE *const file = fopen(name, "rb");
|
||||
const std::string name = url.toLocalFile().toStdString();
|
||||
FILE *const file = fopen(name.c_str(), "rb");
|
||||
if(!file) continue;
|
||||
const auto contents = fileContentsAndClose(file);
|
||||
if(!contents) continue;
|
||||
|
||||
|
||||
CRC::CRC32 generator;
|
||||
const uint32_t crc = generator.compute_crc(*contents);
|
||||
|
||||
|
@ -1170,9 +1170,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="missingROMsBox">
|
||||
<property name="acceptDrops">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user