diff --git a/src/engine/export/sapr.cpp b/src/engine/export/sapr.cpp index 53e124789..16f5fd141 100644 --- a/src/engine/export/sapr.cpp +++ b/src/engine/export/sapr.cpp @@ -44,16 +44,6 @@ void DivExportSAPR::run() { int sapScanlines=0; // TODO: property! int POKEY=-1; int IGNORED=0; - bool palTiming=(e->song.systemFlags[POKEY].getInt("clockSel",0) != 0); - int scanlinesPerFrame = (palTiming?312:262); - size_t tickCount=0; - std::vector> regs; - - if (sapScanlines <= 0) { - sapScanlines = scanlinesPerFrame; - } - //double sapRate = (palTiming?49.86:59.92) * scanlinesPerFrame / sapScanlines; - double sapRate = (palTiming?50:60) * (double)scanlinesPerFrame / (double)sapScanlines; // Locate system index. for (int i=0; isong.systemLen; i++) { @@ -82,6 +72,18 @@ void DivExportSAPR::run() { logAppendf("WARNING: SAP export ignoring %d unsupported system%c",IGNORED,IGNORED>1?'s':' '); } + bool palTiming=(e->song.systemFlags[POKEY].getInt("clockSel",0) != 0); + int scanlinesPerFrame = (palTiming?312:262); + size_t tickCount=0; + std::vector> regs; + + if (sapScanlines <= 0) { + sapScanlines = scanlinesPerFrame; + } + //double sapRate = (palTiming?49.86:59.92) * scanlinesPerFrame / sapScanlines; + double sapRate = (palTiming?50:60) * (double)scanlinesPerFrame / (double)sapScanlines; + + e->stop(); e->repeatPattern=false; e->setOrder(0);