mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
tools/aueffectutil.mm: Fix build.
This commit is contained in:
parent
5242675956
commit
aaccf0fe16
@ -628,25 +628,24 @@ static void UpdateChangeCountCallback(
|
|||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *errDesc = nil;
|
NSError *errDesc = nil;
|
||||||
NSData *const data = [NSPropertyListSerialization dataFromPropertyList:desc
|
NSData *const data = [NSPropertyListSerialization dataWithPropertyList:desc
|
||||||
format:NSPropertyListXMLFormat_v1_0
|
format:NSPropertyListXMLFormat_v1_0
|
||||||
errorDescription:&errDesc];
|
options:0
|
||||||
|
error:&errDesc];
|
||||||
if (!data || errDesc)
|
if (!data || errDesc)
|
||||||
{
|
{
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
NSString *message;
|
NSString *message;
|
||||||
if (errDesc)
|
if (errDesc)
|
||||||
message = [NSString stringWithFormat:@"Error serialising effect settings: %@", errDesc];
|
message = [NSString stringWithFormat:@"Error serialising effect settings: %@", [errDesc localizedDescription]];
|
||||||
else
|
else
|
||||||
message = @"Error serialising effect settings";
|
message = @"Error serialising effect settings";
|
||||||
NSDictionary *const info = [NSDictionary dictionaryWithObjectsAndKeys:message, NSLocalizedDescriptionKey,
|
NSDictionary *const info = [NSDictionary dictionaryWithObjectsAndKeys:message, NSLocalizedDescriptionKey,
|
||||||
nil];
|
nil];
|
||||||
*error = [NSError errorWithDomain:AUEffectUtilErrorDomain code:0 userInfo:info];
|
*error = [NSError errorWithDomain:AUEffectUtilErrorDomain code:0 userInfo:info];
|
||||||
}
|
}
|
||||||
if (errDesc)
|
|
||||||
[errDesc release];
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
@ -891,17 +890,18 @@ static void UpdateChangeCountCallback(
|
|||||||
subtypeValue, ComponentSubTypeKey,
|
subtypeValue, ComponentSubTypeKey,
|
||||||
manufacturerValue, ComponentManufacturerKey,
|
manufacturerValue, ComponentManufacturerKey,
|
||||||
nil];
|
nil];
|
||||||
NSString *errDesc = nil;
|
NSError *errDesc = nil;
|
||||||
NSData *const data = [NSPropertyListSerialization dataFromPropertyList:desc
|
NSData *const data = [NSPropertyListSerialization dataWithPropertyList:desc
|
||||||
format:NSPropertyListXMLFormat_v1_0
|
format:NSPropertyListXMLFormat_v1_0
|
||||||
errorDescription:&errDesc];
|
options:0
|
||||||
|
error:&errDesc];
|
||||||
if (!data || errDesc)
|
if (!data || errDesc)
|
||||||
{
|
{
|
||||||
NSAlert *const alert = [[NSAlert alloc] init];
|
NSAlert *const alert = [[NSAlert alloc] init];
|
||||||
[alert setAlertStyle:NSAlertStyleWarning];
|
[alert setAlertStyle:NSAlertStyleWarning];
|
||||||
[alert setMessageText:@"Error serialising properties for new effect"];
|
[alert setMessageText:@"Error serialising properties for new effect"];
|
||||||
if (errDesc)
|
if (errDesc)
|
||||||
[alert setInformativeText:[errDesc autorelease]];
|
[alert setInformativeText:[errDesc localizedDescription]];
|
||||||
[alert addButtonWithTitle:@"OK"];
|
[alert addButtonWithTitle:@"OK"];
|
||||||
[alert runModal];
|
[alert runModal];
|
||||||
[alert release];
|
[alert release];
|
||||||
@ -1008,7 +1008,7 @@ static void UpdateChangeCountCallback(
|
|||||||
(unsigned long)failed.size(),
|
(unsigned long)failed.size(),
|
||||||
((1U == failed.size()) ? "" : "s")];
|
((1U == failed.size()) ? "" : "s")];
|
||||||
NSMutableString *const detail = [NSMutableString stringWithCapacity:(16 * failed.size())];
|
NSMutableString *const detail = [NSMutableString stringWithCapacity:(16 * failed.size())];
|
||||||
std::vector<std::pair<Component, OSStatus> >::const_iterator it = failed.begin();
|
std::vector<std::pair<AudioComponent, OSStatus> >::const_iterator it = failed.begin();
|
||||||
[detail appendFormat:@"%lu (%ld)", (unsigned long)it->first, (long)it->second];
|
[detail appendFormat:@"%lu (%ld)", (unsigned long)it->first, (long)it->second];
|
||||||
++it;
|
++it;
|
||||||
while (failed.end() != it)
|
while (failed.end() != it)
|
||||||
|
Loading…
Reference in New Issue
Block a user