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