summaryrefslogtreecommitdiff
path: root/macosx/Source
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/Source')
-rw-r--r--macosx/Source/PcsxrMemoryObject.h2
-rw-r--r--macosx/Source/PcsxrMemoryObject.m8
2 files changed, 10 insertions, 0 deletions
diff --git a/macosx/Source/PcsxrMemoryObject.h b/macosx/Source/PcsxrMemoryObject.h
index 215b948b..c22c6971 100644
--- a/macosx/Source/PcsxrMemoryObject.h
+++ b/macosx/Source/PcsxrMemoryObject.h
@@ -28,6 +28,8 @@ typedef NS_ENUM(char, PCSXRMemFlags) {
- (instancetype)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize NS_DESIGNATED_INITIALIZER;
+- (NSImage*)memoryImageAtIndex:(NSInteger)idx;
+
@property (readonly, strong) NSString *englishName;
@property (readonly, strong) NSString *sjisName;
@property (readonly, strong) NSString *memName;
diff --git a/macosx/Source/PcsxrMemoryObject.m b/macosx/Source/PcsxrMemoryObject.m
index db5dac65..aa5f2068 100644
--- a/macosx/Source/PcsxrMemoryObject.m
+++ b/macosx/Source/PcsxrMemoryObject.m
@@ -74,6 +74,14 @@ static NSString *MemLabelEndLink;
});
}
+- (NSImage*)memoryImageAtIndex:(NSInteger)idx
+{
+ if (memImageIndex == -1 || idx > self.memIconCount) {
+ return nil;
+ }
+ return memImages[idx];
+}
+
+ (NSString*)memoryLabelFromFlag:(PCSXRMemFlags)flagNameIndex
{
switch (flagNameIndex) {