diff options
Diffstat (limited to 'macosx/Source/PcsxrCheatHandler.m')
| -rw-r--r-- | macosx/Source/PcsxrCheatHandler.m | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/macosx/Source/PcsxrCheatHandler.m b/macosx/Source/PcsxrCheatHandler.m new file mode 100644 index 00000000..54f6cb5b --- /dev/null +++ b/macosx/Source/PcsxrCheatHandler.m @@ -0,0 +1,36 @@ +// +// PcsxrCheatHandler.m +// Pcsxr +// +// Created by C.W. Betts on 8/1/13. +// +// + +#import "PcsxrCheatHandler.h" +#import "CheatController.h" +#import "PcsxrController.h" +#include "psxcommon.h" +#include "cheat.h" + +@implementation PcsxrCheatHandler + ++ (NSArray *)supportedUTIs +{ + static NSArray *utisupport; + if (utisupport == nil) { + utisupport = @[@"com.codeplex.pcsxr.cheat"]; + } + return utisupport; +} + +- (BOOL)handleFile:(NSString *)theFile +{ + LoadCheats([theFile fileSystemRepresentation]); + + if ([(PcsxrController*)[NSApp delegate] cheatController]) { + [[(PcsxrController*)[NSApp delegate] cheatController] refresh]; + } + return YES; +} + +@end |
