Browse Source

Fix last commit

tags/1.9.4
falkTX 11 years ago
parent
commit
47a5b7fb91
2 changed files with 17 additions and 6 deletions
  1. +3
    -0
      source/backend/native/audiofile.c
  2. +14
    -6
      source/backend/plugin/NativePlugin.cpp

+ 3
- 0
source/backend/native/audiofile.c View File

@@ -292,6 +292,9 @@ static void audiofile_ui_show(PluginHandle handle, bool show)
{
AudioFileInstance* const handlePtr = (AudioFileInstance*)handle;

if (! show)
return;

const char* const filename = handlePtr->host->ui_open_file(handlePtr->host->handle, false, "Open Audio File", "");

if (filename != NULL)


+ 14
- 6
source/backend/plugin/NativePlugin.cpp View File

@@ -494,25 +494,33 @@ public:

if (fDescriptor != nullptr && fHandle != nullptr && fDescriptor->ui_show != nullptr)
{
fIsUiVisible = yesNo;

fDescriptor->ui_show(fHandle, yesNo);

if (yesNo)
{
// Update UI values, FIXME
if (kData->midiprog.current >= 0)
// Update UI values
if (fDescriptor->ui_set_custom_data != nullptr)
{
// TODO
}

if (fDescriptor->ui_set_midi_program != nullptr && kData->midiprog.current >= 0)
{
const MidiProgramData& mpData = kData->midiprog.getCurrent();
fDescriptor->ui_set_midi_program(fHandle, mpData.bank, mpData.program);
}

for (uint32_t i=0; i < kData->param.count; i++)
if (fDescriptor->ui_set_parameter_value != nullptr)
{
fDescriptor->ui_set_parameter_value(fHandle, i, fDescriptor->get_parameter_value(fHandle, i));
for (uint32_t i=0; i < kData->param.count; i++)
{
fDescriptor->ui_set_parameter_value(fHandle, i, fDescriptor->get_parameter_value(fHandle, i));
}
}
}
}

fIsUiVisible = yesNo;
}

void idleGui()


Loading…
Cancel
Save