G0.4: save/restore preset quanh reload khi close GUI (captureState/restoreState, memorystream link truc tiep)
This commit is contained in:
@@ -707,7 +707,12 @@ static void post_close_gui(uint32_t ch, HWND hwnd) {
|
||||
// load/assign rebuilds it).
|
||||
std::lock_guard<std::mutex> lg(g_loadMutex);
|
||||
try {
|
||||
// G0.4: reload() terminates + recreates the instance;
|
||||
// capture the preset first, restore it after, so the
|
||||
// sound survives a GUI close (reopen keeps it too).
|
||||
i->captureState();
|
||||
i->reload();
|
||||
i->restoreState();
|
||||
} catch (...) {
|
||||
std::cerr << "[NativeBridge] closeGUI reload EXCEPTION ch=" << ch
|
||||
<< " — plugin threw (createInstance)" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user