mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-26 20:54:47 +00:00
(Apple) Style nits and cleanups
This commit is contained in:
parent
91faa161af
commit
02b0844061
@ -131,8 +131,8 @@ static char** waiting_argv;
|
||||
|
||||
NSArray* paths = (NSArray*)NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
|
||||
self.configDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:BOXSTRING("RetroArch")];
|
||||
self.globalConfigFile = [NSString stringWithFormat:@"%@/retroarch.cfg", self.configDirectory];
|
||||
self.coreDirectory = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Contents/Resources/modules"];
|
||||
self.globalConfigFile = [NSString stringWithFormat:BOXSTRING("%@/retroarch.cfg"), self.configDirectory];
|
||||
self.coreDirectory = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:BOXSTRING("Contents/Resources/modules")];
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
[self.window setCollectionBehavior:[self.window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
@ -142,12 +142,12 @@ static char** waiting_argv;
|
||||
|
||||
[[RAGameView get] setFrame: [[self.window contentView] bounds]];
|
||||
[[self.window contentView] setAutoresizesSubviews:YES];
|
||||
#if defined(IOS) || defined(MAC_OS_X_VERSION_10_6)
|
||||
#if defined(IOS) || defined(MAC_OS_X_VERSION_10_5)
|
||||
[[self.window contentView] addSubview:RAGameView.get];
|
||||
#endif
|
||||
[self.window makeFirstResponder:[RAGameView get]];
|
||||
|
||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:@"Settings"] autorelease];
|
||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
||||
|
||||
// Create core select list
|
||||
NSComboBox* cb = (NSComboBox*)[[self.coreSelectSheet contentView] viewWithTag:1];
|
||||
@ -221,7 +221,7 @@ static char** waiting_argv;
|
||||
}
|
||||
else
|
||||
{
|
||||
apple_display_alert(@"Cannot open multiple files", @"RetroArch");
|
||||
apple_display_alert(BOXSTRING("Cannot open multiple files"), BOXSTRING("RetroArch"));
|
||||
[sender replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
|
||||
}
|
||||
}
|
||||
@ -229,7 +229,7 @@ static char** waiting_argv;
|
||||
- (void)openDocument:(id)sender
|
||||
{
|
||||
NSOpenPanel* panel = [NSOpenPanel openPanel];
|
||||
#if defined(MAC_OS_X_VERSION_10_6)
|
||||
#if defined(MAC_OS_X_VERSION_10_5)
|
||||
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
|
||||
{
|
||||
[[NSApplication sharedApplication] stopModal];
|
||||
|
@ -71,7 +71,7 @@ static CLLocationAccuracy currentVerticalAccuracy;
|
||||
@implementation NSScreen (IOSCompat)
|
||||
- (CGRect)bounds
|
||||
{
|
||||
CGRect cgrect = NSRectToCGRect([self frame]);
|
||||
CGRect cgrect = (CGRect)NSRectToCGRect(self.frame);
|
||||
return CGRectMake(0, 0, CGRectGetWidth(cgrect), CGRectGetHeight(cgrect));
|
||||
}
|
||||
- (float) scale { return 1.0f; }
|
||||
@ -164,7 +164,7 @@ static bool g_is_syncing = true;
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
UINib *xib = [UINib nibWithNibName:@"PauseIndicatorView" bundle:nil];
|
||||
UINib *xib = [UINib nibWithNibName:BOXSTRING("PauseIndicatorView") bundle:nil];
|
||||
g_pause_indicator_view = [[xib instantiateWithOwner:[RetroArch_iOS get] options:nil] lastObject];
|
||||
|
||||
g_view = [GLKView new];
|
||||
@ -320,7 +320,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||
[_session setSessionPreset:_sessionPreset];
|
||||
|
||||
//-- Creata a video device and input from that Device. Add the input to the capture session.
|
||||
AVCaptureDevice * videoDevice = (AVCaptureDevice*)[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
|
||||
AVCaptureDevice *videoDevice = (AVCaptureDevice*)[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
|
||||
if(videoDevice == nil)
|
||||
assert(0);
|
||||
|
||||
@ -394,8 +394,8 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||
CLLocation *location = (CLLocation*)[locations objectAtIndex:([locations count] - 1)];
|
||||
currentLatitude = [location coordinate].latitude;
|
||||
currentLongitude = [location coordinate].longitude;
|
||||
currentHorizontalAccuracy = [location horizontalAccuracy];
|
||||
currentVerticalAccuracy = [location verticalAccuracy];
|
||||
currentHorizontalAccuracy = location.horizontalAccuracy;
|
||||
currentVerticalAccuracy = location.verticalAccuracy;
|
||||
RARCH_LOG("didUpdateLocations - latitude %f, longitude %f\n", (float)currentLatitude, (float)currentLongitude);
|
||||
}
|
||||
|
||||
@ -713,7 +713,7 @@ typedef struct apple_location
|
||||
void *empty;
|
||||
} applelocation_t;
|
||||
|
||||
static void *apple_location_init()
|
||||
static void *apple_location_init(void)
|
||||
{
|
||||
applelocation_t *applelocation = (applelocation_t*)calloc(1, sizeof(applelocation_t));
|
||||
if (!applelocation)
|
||||
|
Loading…
Reference in New Issue
Block a user