mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
CoreMidi: Fetch detailed error information on supported platforms
This commit is contained in:
parent
883d3cdce3
commit
774819540e
1 changed files with 11 additions and 3 deletions
|
|
@ -2233,11 +2233,19 @@ struct CoreMidiHelpers
|
|||
[mutableBlocks.get() addObject: mutableBlock.get()];
|
||||
|
||||
NSError* error = nullptr;
|
||||
// On macOS 15, passing a non-null NSError* will cause the function to fail.
|
||||
// Hopefully we can get more detailed error information in future versions.
|
||||
auto** errorParam = std::invoke ([&error]() -> NSError**
|
||||
{
|
||||
// On macOS 15, passing a non-null NSError* will cause the function to fail.
|
||||
// This issue is fixed in macOS 26 beta 4.
|
||||
if (@available (macOS 26, iOS 26, *))
|
||||
return &error;
|
||||
|
||||
return nullptr;
|
||||
});
|
||||
|
||||
const auto successAssigningBlocks = [endpoint registerFunctionBlocks: mutableBlocks.get()
|
||||
markAsStatic: (areStatic == ump::BlocksAreStatic::yes)
|
||||
error: nil];
|
||||
error: errorParam];
|
||||
|
||||
if (! successAssigningBlocks)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue