further preparations
This commit is contained in:
parent
a4aa408912
commit
148f49eb2b
|
@ -62,6 +62,7 @@ class DivROMExport {
|
|||
virtual void wait();
|
||||
std::vector<DivROMExportOutput>& getResult();
|
||||
virtual bool hasFailed();
|
||||
virtual bool isRunning();
|
||||
virtual DivROMExportProgress getProgress();
|
||||
virtual ~DivROMExport() {}
|
||||
};
|
||||
|
|
|
@ -51,3 +51,7 @@ void DivROMExport::logAppend(String what) {
|
|||
|
||||
void DivROMExport::wait() {
|
||||
}
|
||||
|
||||
bool DivROMExport::isRunning() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -271,10 +271,24 @@ void DivExportAmigaValidation::run() {
|
|||
output.push_back(DivROMExportOutput("sample.bin",sample));
|
||||
output.push_back(DivROMExportOutput("wave.bin",wave));
|
||||
output.push_back(DivROMExportOutput("seq.bin",seq));
|
||||
|
||||
running=false;
|
||||
}
|
||||
|
||||
bool DivExportAmigaValidation::go(DivEngine* eng) {
|
||||
e=eng;
|
||||
running=true;
|
||||
exportThread=new std::thread(&DivExportAmigaValidation::run,this);
|
||||
return true;
|
||||
}
|
||||
|
||||
void DivExportAmigaValidation::wait() {
|
||||
if (exportThread!=NULL) {
|
||||
exportThread->join();
|
||||
delete exportThread;
|
||||
}
|
||||
}
|
||||
|
||||
bool DivExportAmigaValidation::isRunning() {
|
||||
return running;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,11 @@
|
|||
class DivExportAmigaValidation: public DivROMExport {
|
||||
DivEngine* e;
|
||||
std::thread* exportThread;
|
||||
bool running;
|
||||
void run();
|
||||
public:
|
||||
bool go(DivEngine* e);
|
||||
void abort();
|
||||
void wait();
|
||||
~DivExportAmigaValidation() {}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue