| 383 | } |
| 384 | |
| 385 | void EmuThread::load(emu_data_t fileType, const QString &filePath) { |
| 386 | |
| 387 | /* if loading an image or rom, we need to restart emulation */ |
| 388 | if (fileType == EMU_DATA_IMAGE || fileType == EMU_DATA_ROM) { |
| 389 | setTerminationEnabled(); |
| 390 | stop(); |
| 391 | |
| 392 | emit loaded(emu_load(fileType, filePath.toStdString().c_str()), fileType); |
| 393 | } else if (fileType == EMU_DATA_RAM) { |
| 394 | m_loadPath = filePath; |
| 395 | m_loadType = fileType; |
| 396 | req(RequestLoad); |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | void EmuThread::stop() { |
| 401 | // Need to run events to allow queued slots to be processed during exit |
no test coverage detected