finally fix invalid module disrupting program
This commit is contained in:
parent
f327e036ce
commit
498fa99c5a
|
@ -1413,6 +1413,12 @@ void DivEngine::reset() {
|
||||||
dispatch->reset();
|
dispatch->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DivEngine::syncReset() {
|
||||||
|
isBusy.lock();
|
||||||
|
reset();
|
||||||
|
isBusy.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
String DivEngine::getConfigPath() {
|
String DivEngine::getConfigPath() {
|
||||||
return configPath;
|
return configPath;
|
||||||
}
|
}
|
||||||
|
@ -1696,6 +1702,7 @@ void DivEngine::initDispatch() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dispatch->init(this,getChannelCount(song.system),got.rate,(!song.pal) || (song.customTempo!=0 && song.hz<53));
|
dispatch->init(this,getChannelCount(song.system),got.rate,(!song.pal) || (song.customTempo!=0 && song.hz<53));
|
||||||
|
chans=getChannelCount(song.system);
|
||||||
|
|
||||||
blip_set_rates(bb[0],dispatch->rate,got.rate);
|
blip_set_rates(bb[0],dispatch->rate,got.rate);
|
||||||
blip_set_rates(bb[1],dispatch->rate,got.rate);
|
blip_set_rates(bb[1],dispatch->rate,got.rate);
|
||||||
|
|
|
@ -108,6 +108,7 @@ class DivEngine {
|
||||||
bool perSystemEffect(int ch, unsigned char effect, unsigned char effectVal);
|
bool perSystemEffect(int ch, unsigned char effect, unsigned char effectVal);
|
||||||
bool perSystemPostEffect(int ch, unsigned char effect, unsigned char effectVal);
|
bool perSystemPostEffect(int ch, unsigned char effect, unsigned char effectVal);
|
||||||
void renderSamples();
|
void renderSamples();
|
||||||
|
void reset();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DivSong song;
|
DivSong song;
|
||||||
|
@ -146,7 +147,7 @@ class DivEngine {
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
// reset playback state
|
// reset playback state
|
||||||
void reset();
|
void syncReset();
|
||||||
|
|
||||||
// get config path
|
// get config path
|
||||||
String getConfigPath();
|
String getConfigPath();
|
||||||
|
|
|
@ -1768,11 +1768,11 @@ int FurnaceGUI::load(String path) {
|
||||||
if (!e->load(file,(size_t)len)) {
|
if (!e->load(file,(size_t)len)) {
|
||||||
logE("could not open file!\n");
|
logE("could not open file!\n");
|
||||||
e->initDispatch();
|
e->initDispatch();
|
||||||
e->reset();
|
e->syncReset();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
e->initDispatch();
|
e->initDispatch();
|
||||||
e->reset();
|
e->syncReset();
|
||||||
}
|
}
|
||||||
updateWindowTitle();
|
updateWindowTitle();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2058,11 +2058,11 @@ bool FurnaceGUI::init() {
|
||||||
ImGui::GetIO().ConfigFlags|=ImGuiConfigFlags_DockingEnable;
|
ImGui::GetIO().ConfigFlags|=ImGuiConfigFlags_DockingEnable;
|
||||||
ImGui::GetIO().IniFilename=finalLayoutPath;
|
ImGui::GetIO().IniFilename=finalLayoutPath;
|
||||||
|
|
||||||
if ((mainFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(defFont_main_compressed_data,defFont_main_compressed_size,18*dpiScale))==NULL) {
|
if ((mainFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(defFont_main_compressed_data,defFont_main_compressed_size,e->getConfInt("mainFontSize",18)*dpiScale))==NULL) {
|
||||||
logE("could not load UI font!\n");
|
logE("could not load UI font!\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((patFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(defFont_pat_compressed_data,defFont_pat_compressed_size,18*dpiScale))==NULL) {
|
if ((patFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(defFont_pat_compressed_data,defFont_pat_compressed_size,e->getConfInt("patFontSize",18)*dpiScale))==NULL) {
|
||||||
logE("could not load pattern font!\n");
|
logE("could not load pattern font!\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue