diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-12 22:50:37 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-12 22:50:37 +0000 |
| commit | b83c8fe686c5374b38b31510f9803d3908d0c4f8 (patch) | |
| tree | ce9eb52a3e041128304bd79a2065c75029aca9a9 | |
| parent | 98f9382fb8307e539091454392ca658648f722b8 (diff) | |
| download | pcsxr-b83c8fe686c5374b38b31510f9803d3908d0c4f8.tar.gz | |
Changing Mac getters to be more Objective-C.
Getters in Objective-C are just named what they are getting, I.E. "getVariable" isn't valid, but "variable" is.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72232 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | macosx/PcsxrPlugin.h | 10 | ||||
| -rw-r--r-- | macosx/PcsxrPlugin.m | 28 | ||||
| -rw-r--r-- | macosx/PluginController.m | 2 | ||||
| -rw-r--r-- | macosx/PluginList.m | 8 | ||||
| -rw-r--r-- | macosx/plugins/DFInput/macsrc/ControllerList.h | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFInput/macsrc/ControllerList.m | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFInput/macsrc/MappingCell.m | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFInput/macsrc/PadView.m | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFXVideo/macsrc/PluginWindowController.h | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFXVideo/macsrc/PluginWindowController.m | 6 | ||||
| -rw-r--r-- | macosx/plugins/DFXVideo/macsrc/drawgl.m | 2 | ||||
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h | 2 | ||||
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m | 14 | ||||
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/drawgl.m | 2 |
14 files changed, 42 insertions, 42 deletions
diff --git a/macosx/PcsxrPlugin.h b/macosx/PcsxrPlugin.h index 9594fd27..f0721161 100644 --- a/macosx/PcsxrPlugin.h +++ b/macosx/PcsxrPlugin.h @@ -20,14 +20,14 @@ int active; } -+ (NSString *)getPrefixForType:(int)type; -+ (NSString *)getDefaultKeyForType:(int)type; -+ (char **)getConfigEntriesForType:(int)type; ++ (NSString *)prefixForType:(int)type; ++ (NSString *)defaultKeyForType:(int)type; ++ (char **)configEntriesForType:(int)type; - (id)initWithPath:(NSString *)aPath; -- (NSString *)getDisplayVersion; -- (int)getType; +- (NSString *)displayVersion; +- (int)type; - (NSString *)path; - (NSUInteger)hash; - (NSString *)description; diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m index 3332ca68..c8cc7169 100644 --- a/macosx/PcsxrPlugin.m +++ b/macosx/PcsxrPlugin.m @@ -13,7 +13,7 @@ @implementation PcsxrPlugin -+ (NSString *)getPrefixForType:(int)aType ++ (NSString *)prefixForType:(int)aType { switch (aType) { case PSE_LT_GPU: return @"GPU"; @@ -26,9 +26,9 @@ return @""; } -+ (NSString *)getDefaultKeyForType:(int)aType ++ (NSString *)defaultKeyForType:(int)aType { - //return @"Plugin" [PcsxrPlugin getPrefixForType:aType]; + //return @"Plugin" [PcsxrPlugin prefixForType:aType]; switch (aType) { case PSE_LT_GPU: return @"PluginGPU"; case PSE_LT_CDR: return @"PluginCDR"; @@ -40,7 +40,7 @@ return @""; } -+ (char **)getConfigEntriesForType:(int)aType ++ (char **)configEntriesForType:(int)aType { static char *gpu[2] = {(char *)&Config.Gpu, NULL}; static char *cdr[2] = {(char *)&Config.Cdr, NULL}; @@ -175,7 +175,7 @@ return 0; } - sprintf(symbol, "%sinit", [[PcsxrPlugin getPrefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); + sprintf(symbol, "%sinit", [[PcsxrPlugin prefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); init = initArg = SysLoadSym(pluginRef, symbol); if (SysLibError() == nil) { if (aType != PSE_LT_PAD) @@ -188,7 +188,7 @@ active |= aType; } else { NSRunCriticalAlertPanel(NSLocalizedString(@"Plugin Initialization Failed!", nil), - [NSString stringWithFormat:NSLocalizedString(@"Pcsxr failed to initialize the selected %s plugin (error=%i).\nThe plugin might not work with your system.", nil), [PcsxrPlugin getPrefixForType:aType], res], + [NSString stringWithFormat:NSLocalizedString(@"Pcsxr failed to initialize the selected %s plugin (error=%i).\nThe plugin might not work with your system.", nil), [PcsxrPlugin prefixForType:aType], res], nil, nil, nil); } @@ -200,7 +200,7 @@ char symbol[255]; long (*shutdown)(void); - sprintf(symbol, "%sshutdown", [[PcsxrPlugin getPrefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); + sprintf(symbol, "%sshutdown", [[PcsxrPlugin prefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); shutdown = SysLoadSym(pluginRef, symbol); if (SysLibError() == nil) { active &= ~aType; @@ -214,7 +214,7 @@ { char symbol[255]; - sprintf(symbol, "%sabout", [[PcsxrPlugin getPrefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); + sprintf(symbol, "%sabout", [[PcsxrPlugin prefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); SysLoadSym(pluginRef, symbol); return (SysLibError() == nil); @@ -224,7 +224,7 @@ { char symbol[255]; - sprintf(symbol, "%sconfigure", [[PcsxrPlugin getPrefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); + sprintf(symbol, "%sconfigure", [[PcsxrPlugin prefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); SysLoadSym(pluginRef, symbol); return (SysLibError() == nil); @@ -235,7 +235,7 @@ NSArray *arg; char symbol[255]; - sprintf(symbol, "%sabout", [[PcsxrPlugin getPrefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); + sprintf(symbol, "%sabout", [[PcsxrPlugin prefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); arg = [[NSArray alloc] initWithObjects:[NSString stringWithCString:symbol encoding:NSUTF8StringEncoding], [NSNumber numberWithInt:0], nil]; @@ -249,7 +249,7 @@ NSArray *arg; char symbol[255]; - sprintf(symbol, "%sconfigure", [[PcsxrPlugin getPrefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); + sprintf(symbol, "%sconfigure", [[PcsxrPlugin prefixForType:aType] cStringUsingEncoding:NSUTF8StringEncoding]); arg = [[NSArray alloc] initWithObjects:[NSString stringWithCString:symbol encoding:NSUTF8StringEncoding], [NSNumber numberWithInt:1], nil]; @@ -258,7 +258,7 @@ withObject:arg]; } -- (NSString *)getDisplayVersion +- (NSString *)displayVersion { if (version == -1) return @""; @@ -266,7 +266,7 @@ return [NSString stringWithFormat:@"v%ld.%ld.%ld", version>>16,(version>>8)&0xff,version&0xff]; } -- (int)getType +- (int)type { return type; } @@ -286,7 +286,7 @@ if (name == nil) return [path lastPathComponent]; - return [NSString stringWithFormat:@"%@ %@ [%@]", name, [self getDisplayVersion], [path lastPathComponent]]; + return [NSString stringWithFormat:@"%@ %@ [%@]", name, [self displayVersion], [path lastPathComponent]]; } // the plugin will check if it's still valid and return the status diff --git a/macosx/PluginController.m b/macosx/PluginController.m index 3dd6fab6..d75e8892 100644 --- a/macosx/PluginController.m +++ b/macosx/PluginController.m @@ -51,7 +51,7 @@ // remember the list pluginType = type; plugins = [list retain]; - defaultKey = [[PcsxrPlugin getDefaultKeyForType:pluginType] retain]; + defaultKey = [[PcsxrPlugin defaultKeyForType:pluginType] retain]; // clear the previous menu items [pluginMenu removeAllItems]; diff --git a/macosx/PluginList.m b/macosx/PluginList.m index 38df989e..f3d5a449 100644 --- a/macosx/PluginList.m +++ b/macosx/PluginList.m @@ -64,7 +64,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD}; type = typeMask; for (i=0; i<[plugins count]; i++) { PcsxrPlugin *plugin = [plugins objectAtIndex:i]; - if ([plugin getType] == type) { + if ([plugin type] == type) { [list addObject:plugin]; } } @@ -102,7 +102,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD}; missingPlugins = NO; for (i = 0; i < sizeof(*typeList); i++) { - NSString *path = [defaults stringForKey:[PcsxrPlugin getDefaultKeyForType:typeList[i]]]; + NSString *path = [defaults stringForKey:[PcsxrPlugin defaultKeyForType:typeList[i]]]; if (nil == path) { missingPlugins = YES; continue; @@ -204,7 +204,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD}; for (i=0; i<[pluginList count]; i++) { PcsxrPlugin *plugin = [pluginList objectAtIndex:i]; - if ([plugin getType] & typeMask) { + if ([plugin type] & typeMask) { [types addObject:plugin]; } } @@ -306,7 +306,7 @@ const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD}; str = "Invalid Plugin"; } - char **dst = [PcsxrPlugin getConfigEntriesForType:type]; + char **dst = [PcsxrPlugin configEntriesForType:type]; while (*dst) { strncpy(*dst, str, 255); dst++; diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.h b/macosx/plugins/DFInput/macsrc/ControllerList.h index 91320b28..513dae16 100644 --- a/macosx/plugins/DFInput/macsrc/ControllerList.h +++ b/macosx/plugins/DFInput/macsrc/ControllerList.h @@ -33,7 +33,7 @@ + (void)setCurrentController:(int)which; + (int)currentController; -+ (int)getButtonOfRow:(int)row; ++ (int)buttonOfRow:(int)row; - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView; - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex; - (void)deleteRow:(NSInteger)which; diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.m b/macosx/plugins/DFInput/macsrc/ControllerList.m index db25d2f2..90cc618f 100644 --- a/macosx/plugins/DFInput/macsrc/ControllerList.m +++ b/macosx/plugins/DFInput/macsrc/ControllerList.m @@ -103,7 +103,7 @@ static const int DPad[DKEY_TOTAL] = { DKEY_ANALOG }; -+ (int)getButtonOfRow:(int)row ++ (int)buttonOfRow:(int)row { return DPad[row]; } diff --git a/macosx/plugins/DFInput/macsrc/MappingCell.m b/macosx/plugins/DFInput/macsrc/MappingCell.m index 48e5dfe5..50cbb56a 100644 --- a/macosx/plugins/DFInput/macsrc/MappingCell.m +++ b/macosx/plugins/DFInput/macsrc/MappingCell.m @@ -55,7 +55,7 @@ [NSApp runModalSession:session]; row = [tableView selectedRow]; if (row < DKEY_TOTAL) { - changed = ReadDKeyEvent(whichPad, [ControllerList getButtonOfRow:row]); + changed = ReadDKeyEvent(whichPad, [ControllerList buttonOfRow:row]); } else { row -= DKEY_TOTAL; changed = ReadAnalogEvent(whichPad, row / 4, row % 4); diff --git a/macosx/plugins/DFInput/macsrc/PadView.m b/macosx/plugins/DFInput/macsrc/PadView.m index e6828e10..9cfa2666 100644 --- a/macosx/plugins/DFInput/macsrc/PadView.m +++ b/macosx/plugins/DFInput/macsrc/PadView.m @@ -89,7 +89,7 @@ /* handles key events on the pad list */ - (void)keyDown:(NSEvent *)theEvent { - NSEventType key = [theEvent keyCode]; + unsigned short key = [theEvent keyCode]; if ([[theEvent window] firstResponder] == tableView) { if (key == 51 || key == 117) { diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h index d88bd867..b8eccf4a 100644 --- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h +++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h @@ -34,7 +34,7 @@ extern PluginWindowController *gameController; } + (id)openGameView; -- (PluginGLView *)getOpenGLView; +- (PluginGLView *)openGLView; - (BOOL)fullscreen; - (void)setFullscreen:(BOOL)flag; diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m index 48262e56..7bfa656f 100644 --- a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m @@ -46,7 +46,7 @@ NSRect windowFrame; [gameWindow makeKeyAndOrderFront:nil]; [gameController showWindow:nil]; - CGDirectDisplayID display = (CGDirectDisplayID)[[[[gameWindow screen] deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[[gameWindow screen] deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; if (CGDisplayIsCaptured(display)) { [gameController setFullscreen:YES]; } @@ -54,7 +54,7 @@ NSRect windowFrame; return gameController; } -- (PluginGLView *)getOpenGLView +- (PluginGLView *)openGLView { return (PluginGLView *)glView; } @@ -94,7 +94,7 @@ NSRect windowFrame; { NSWindow *window = [self window]; NSScreen *screen = [window screen]; - CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; NSDisableScreenUpdates(); diff --git a/macosx/plugins/DFXVideo/macsrc/drawgl.m b/macosx/plugins/DFXVideo/macsrc/drawgl.m index 81f5f32e..18d3762a 100644 --- a/macosx/plugins/DFXVideo/macsrc/drawgl.m +++ b/macosx/plugins/DFXVideo/macsrc/drawgl.m @@ -114,7 +114,7 @@ unsigned long ulInitDisplay(void) // OPEN GAME WINDOW } PluginWindowController *windowController = [PluginWindowController openGameView]; - glView = [windowController getOpenGLView]; + glView = [windowController openGLView]; NSString *title = [NSString stringWithCString:pCaptionText encoding:NSUTF8StringEncoding]; [[windowController window] setTitle:title]; diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h index a60a4b81..6ad83f63 100644 --- a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h +++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.h @@ -44,7 +44,7 @@ extern PluginWindowController *gameController; } + (id)openGameView; -- (PluginGLView *)getOpenGLView; +- (PluginGLView *)openGLView; - (BOOL)fullscreen; - (void)setFullscreen:(BOOL)flag; - (void)performFullscreenSwap; diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m index 5f3ee7dd..5fc97637 100644 --- a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m +++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m @@ -94,12 +94,12 @@ NSRect FitRectInRect(NSRect source, NSRect destination) [gameWindow makeKeyAndOrderFront:nil]; [gameController showWindow:nil]; - NSOpenGLView* glInstance = [gameController getOpenGLView]; + NSOpenGLView* glInstance = [gameController openGLView]; [glInstance setFrameSize: windowDefaultRect.size]; [glInstance reshape]; // [glView update]; - CGDirectDisplayID display = (CGDirectDisplayID)[[[[gameWindow screen] deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[[gameWindow screen] deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; if (CGDisplayIsCaptured(display)) { [gameController setFullscreen:YES]; } @@ -141,7 +141,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination) - (NSRect) screenFrame { NSWindow* wind = [self window]; - CGDirectDisplayID display = (CGDirectDisplayID)[[[[wind screen] deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[[wind screen] deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; return NSMakeRect (0,0,CGDisplayPixelsWide(display), CGDisplayPixelsHigh(display)); } @@ -169,7 +169,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination) } -- (PluginGLView *)getOpenGLView +- (PluginGLView *)openGLView { return (PluginGLView *)glView; } @@ -277,7 +277,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination) NSWindow *window = [self window]; NSScreen *screen = [window screen]; - CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; NSRect newPlace; @@ -365,7 +365,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination) NSWindow *window = [self window]; NSScreen *screen = [window screen]; - CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; if ([self fullscreen]){ [window setLevel: NSScreenSaverWindowLevel]; @@ -378,7 +378,7 @@ NSRect FitRectInRect(NSRect source, NSRect destination) // if in fullscreen, we must abdicate mouse hiding and level. NSWindow *window = [self window]; NSScreen *screen = [window screen]; - CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; if ([self fullscreen]){ [window setLevel: NSNormalWindowLevel]; diff --git a/macosx/plugins/PeopsXgl/macsrc/drawgl.m b/macosx/plugins/PeopsXgl/macsrc/drawgl.m index 70c5a15e..dcf9e675 100644 --- a/macosx/plugins/PeopsXgl/macsrc/drawgl.m +++ b/macosx/plugins/PeopsXgl/macsrc/drawgl.m @@ -155,7 +155,7 @@ unsigned long ulInitDisplay(void) // OPEN GAME WINDOW // this causes a runtime error if it's done on a thread other than the main thread dispatch_sync(dispatch_get_main_queue(), ^{ windowController = [PluginWindowController openGameView]; - glView = [windowController getOpenGLView]; + glView = [windowController openGLView]; [[windowController window] setTitle:[NSString stringWithCString:pCaptionText encoding:NSUTF8StringEncoding]]; }); |
