zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 0f7871693264712cf4b01e4965971d95a45a71de
parent 487fe77a16b1985cb4681d7607ec25033888f06f
Author: Ricard Wanderlof <polluxsynth@butoba.net>
Date:   Mon, 14 Feb 2022 00:17:13 +0100

MiddleWare.cpp: Replace old raiseUi call with d.reply (#331)

All /alert messages are sent using d.reply(), so do the same when
/bank/save_to_slot fails, rather than using raiseUi().

Otherwise, if /bank/save_to_slot fails, the fusion UI will never
get the alert message.

Diffstat:
Msrc/Misc/MiddleWare.cpp | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -1540,10 +1540,8 @@ static rtosc::Ports middwareSnoopPortsWithoutNonRtParams = { impl.doReadOnlyOp([&impl,slot,part_id,&err](){ err = impl.master->bank.savetoslot(slot, impl.master->part[part_id]);}); if(err) { - char buffer[1024]; - rtosc_message(buffer, 1024, "/alert", "s", + d.reply("/alert", "s", "Failed To Save To Bank Slot, please check file permissions"); - GUI::raiseUi(impl.ui, buffer); } else d.broadcast("/damage", "s", "/bank/search_results/"); rEnd},