Skip to content

Commit

Permalink
feat: update mame dependency; save/load error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcarnie committed Nov 14, 2019
1 parent 3e84bed commit dd86bd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions MAMEGameCore.m
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@ - (void)saveStateToFileAtPath:(NSString *)fileName completionHandler:(void (^)(B
{
res = [_osd saveStateFromFileAtPath:fileName error:&err];
}
else
{
err = [NSError errorWithDomain:OEGameCoreErrorDomain code:OEGameCoreCouldNotSaveStateError userInfo:@{
NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Game \"%@\" does not not support save states.", _osd.driverFullName],
}];
}

block(res, err);
}
Expand All @@ -404,6 +410,12 @@ - (void)loadStateFromFileAtPath:(NSString *)fileName completionHandler:(void (^)
{
res = [_osd loadStateFromFileAtPath:fileName error:&err];
}
else
{
err = [NSError errorWithDomain:OEGameCoreErrorDomain code:OEGameCoreCouldNotSaveStateError userInfo:@{
NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Game \"%@\" does not not support save states.", _osd.driverFullName],
}];
}

block(res, err);
}
Expand Down
2 changes: 1 addition & 1 deletion deps/mame

0 comments on commit dd86bd1

Please sign in to comment.