mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-03 09:47:26 +00:00
SAP-R export: fix crash
This commit is contained in:
parent
b0bf13df94
commit
14e38ab450
1 changed files with 12 additions and 10 deletions
|
@ -44,16 +44,6 @@ void DivExportSAPR::run() {
|
||||||
int sapScanlines=0; // TODO: property!
|
int sapScanlines=0; // TODO: property!
|
||||||
int POKEY=-1;
|
int POKEY=-1;
|
||||||
int IGNORED=0;
|
int IGNORED=0;
|
||||||
bool palTiming=(e->song.systemFlags[POKEY].getInt("clockSel",0) != 0);
|
|
||||||
int scanlinesPerFrame = (palTiming?312:262);
|
|
||||||
size_t tickCount=0;
|
|
||||||
std::vector<std::array<uint8_t, 9>> 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.
|
// Locate system index.
|
||||||
for (int i=0; i<e->song.systemLen; i++) {
|
for (int i=0; i<e->song.systemLen; i++) {
|
||||||
|
@ -82,6 +72,18 @@ void DivExportSAPR::run() {
|
||||||
logAppendf("WARNING: SAP export ignoring %d unsupported system%c",IGNORED,IGNORED>1?'s':' ');
|
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<std::array<uint8_t, 9>> 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->stop();
|
||||||
e->repeatPattern=false;
|
e->repeatPattern=false;
|
||||||
e->setOrder(0);
|
e->setOrder(0);
|
||||||
|
|
Loading…
Reference in a new issue