summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-10-07 10:52:22 -0700
committerJohn Stebbins <[email protected]>2015-10-09 13:48:30 -0700
commit71ec27786fb8f2d455b5b7317b9384d6dc3b058f (patch)
tree8e4e5ebe85106f4f8eb53abbbf7a3e0a4adb2cbf /macosx
parent305d591def7d9bb32f3dd3020c511970f3363960 (diff)
presets: add result to indicate if preset import modified presets
This information is useful to the frontends in creation of preset backups.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBPreset.m5
-rw-r--r--macosx/HBPresetsManager.m5
2 files changed, 8 insertions, 2 deletions
diff --git a/macosx/HBPreset.m b/macosx/HBPreset.m
index 26edbba6c..8b3d5c6ba 100644
--- a/macosx/HBPreset.m
+++ b/macosx/HBPreset.m
@@ -98,7 +98,10 @@
// Run the json through the libhb import function
// to avoid importing unknowns keys.
if (presetsJson.length) {
- char *importedJson = hb_presets_import_json(presetsJson.UTF8String);
+ char *importedJson;
+ int result;
+
+ result = hb_presets_import_json(presetsJson.UTF8String, &importedJson);
if (importedJson)
{
diff --git a/macosx/HBPresetsManager.m b/macosx/HBPresetsManager.m
index b17294b27..a98269298 100644
--- a/macosx/HBPresetsManager.m
+++ b/macosx/HBPresetsManager.m
@@ -111,7 +111,10 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
if ([self checkIfOutOfDate:presetsDict])
{
- char *updatedJson = hb_presets_import_json(cleanedJson);
+ char *updatedJson;
+ int result;
+
+ result = hb_presets_import_json(cleanedJson, &updatedJson);
presetsDict = [NSJSONSerialization HB_JSONObjectWithUTF8String:updatedJson options:0 error:NULL];
free(updatedJson);
}