2019-10-16 20:22:45 -04:00
|
|
|
#include "stdafx.h"
|
2021-04-09 21:45:04 -04:00
|
|
|
#include "Core/Shared/RecordedRomTest.h"
|
|
|
|
#include "Core/Shared/Emulator.h"
|
2019-10-16 20:22:45 -04:00
|
|
|
|
2021-04-03 20:40:48 -04:00
|
|
|
extern shared_ptr<Emulator> _emu;
|
2019-10-16 20:22:45 -04:00
|
|
|
shared_ptr<RecordedRomTest> _recordedRomTest;
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
DllExport int32_t __stdcall RunRecordedTest(char* filename, bool inBackground)
|
|
|
|
{
|
2021-04-03 20:40:48 -04:00
|
|
|
shared_ptr<RecordedRomTest> romTest(new RecordedRomTest(inBackground ? nullptr : _emu));
|
2019-10-16 20:22:45 -04:00
|
|
|
return romTest->Run(filename);
|
|
|
|
}
|
|
|
|
|
|
|
|
DllExport void __stdcall RomTestRecord(char* filename, bool reset)
|
|
|
|
{
|
2021-04-03 20:40:48 -04:00
|
|
|
_recordedRomTest.reset(new RecordedRomTest(_emu));
|
2019-10-16 20:22:45 -04:00
|
|
|
_recordedRomTest->Record(filename, reset);
|
|
|
|
}
|
|
|
|
|
|
|
|
DllExport void __stdcall RomTestStop()
|
|
|
|
{
|
|
|
|
if(_recordedRomTest) {
|
|
|
|
_recordedRomTest->Stop();
|
|
|
|
_recordedRomTest.reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DllExport bool __stdcall RomTestRecording() { return _recordedRomTest != nullptr; }
|
|
|
|
}
|