diff --git a/apple/OSX/platform.m b/apple/OSX/platform.m index 7ba5a42ed6..f6615853db 100644 --- a/apple/OSX/platform.m +++ b/apple/OSX/platform.m @@ -16,8 +16,6 @@ #include -#include - #import "../common/RetroArch_Apple.h" #include "../../input/drivers/apple_input.h" #include "../../frontend/frontend.h" @@ -52,7 +50,7 @@ void apple_rarch_exited(void) if (!apple) return; - switch ((NSInteger)event_type) + switch ((int32_t)event_type) { case NSKeyDown: case NSKeyUp: @@ -63,7 +61,7 @@ void apple_rarch_exited(void) if (ch && ch.length != 0) { - NSUInteger i; + uint32_t i; character = [ch characterAtIndex:0]; if (event.modifierFlags & NSAlphaShiftKeyMask) @@ -79,7 +77,7 @@ void apple_rarch_exited(void) if (event.modifierFlags & NSNumericPadKeyMask) mod |= RETROKMOD_NUMLOCK; - for (i = 1; i < ch.length; i ++) + for (i = 1; i < ch.length; i++) apple_input_keyboard_event(event_type == NSKeyDown, 0, [ch characterAtIndex:i], mod, RETRO_DEVICE_KEYBOARD); } @@ -432,7 +430,7 @@ static void poll_iteration(void) rarch_main_command(cmd); } -- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo +- (void)alertDidEnd:(NSAlert *)alert returnCode:(int32_t)returnCode contextInfo:(void *)contextInfo { [[NSApplication sharedApplication] stopModal]; } diff --git a/apple/OSX/settings.m b/apple/OSX/settings.m index 74a93c15e7..7ceed5bb4b 100644 --- a/apple/OSX/settings.m +++ b/apple/OSX/settings.m @@ -14,7 +14,6 @@ * If not, see . */ -#import #import "../common/RetroArch_Apple.h" #include #include "../../settings.h" @@ -210,12 +209,12 @@ NSWindowDelegate> } #pragma mark Section Table -- (NSInteger)numberOfRowsInTableView:(NSTableView*)view +- (int32_t)numberOfRowsInTableView:(NSTableView*)view { return self.settings.count; } -- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row +- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int32_t)row { #if defined(MAC_OS_X_VERSION_10_6) return objc_getAssociatedObject([self.settings objectAtIndex:row], associated_name_tag); @@ -232,12 +231,12 @@ NSWindowDelegate> } #pragma mark Setting Outline -- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item +- (int32_t)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { return (item == nil) ? [self.currentGroup count] : [item count]; } -- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)idx ofItem:(id)item +- (id)outlineView:(NSOutlineView *)outlineView child:(int32_t)idx ofItem:(id)item { return (item == nil) ? [self.currentGroup objectAtIndex:idx] : [item objectAtIndex:idx]; } diff --git a/apple/common/RAGameView.m b/apple/common/RAGameView.m index 3c8d3f9c83..c8788e04ea 100644 --- a/apple/common/RAGameView.m +++ b/apple/common/RAGameView.m @@ -14,7 +14,7 @@ * If not, see . */ -#import +#import #import "RetroArch_Apple.h" #include "../../general.h" #include "../../runloop.h" diff --git a/apple/common/apple_gfx_context.c.inl b/apple/common/apple_gfx_context.c.inl index cc9721a624..5f41ebbe49 100644 --- a/apple/common/apple_gfx_context.c.inl +++ b/apple/common/apple_gfx_context.c.inl @@ -228,9 +228,9 @@ static bool apple_gfx_ctx_set_video_mode(void *data, unsigned width, unsigned he return true; } -CGFloat apple_gfx_ctx_get_native_scale(void) +float apple_gfx_ctx_get_native_scale(void) { - static CGFloat ret = 0.0f; + static float ret = 0.0f; SEL selector = NSSelectorFromString(BOXSTRING("nativeScale")); RAScreen *screen = (RAScreen*)get_chosen_screen(); @@ -261,7 +261,7 @@ static void apple_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned* RAScreen *screen = (RAScreen*)get_chosen_screen(); CGRect size = screen.bounds; gl_t *gl = (gl_t*)data; - CGFloat screenscale = apple_gfx_ctx_get_native_scale(); + float screenscale = apple_gfx_ctx_get_native_scale(); if (gl) { diff --git a/apple/common/utility.m b/apple/common/utility.m index c7622dc89f..da26b76f4b 100644 --- a/apple/common/utility.m +++ b/apple/common/utility.m @@ -60,10 +60,11 @@ void apple_display_alert(const char *message, const char *title) - (BOOL)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error { + unsigned i; bool hasDot = false; if (partialString.length) - for (NSUInteger i = 0; i < partialString.length; i ++) + for (i = 0; i < partialString.length; i ++) { unichar ch = [partialString characterAtIndex:i]; diff --git a/gfx/drivers_font_renderer/coretext.c b/gfx/drivers_font_renderer/coretext.c index e3efb8c57f..8acafa699d 100644 --- a/gfx/drivers_font_renderer/coretext.c +++ b/gfx/drivers_font_renderer/coretext.c @@ -75,7 +75,7 @@ static bool font_renderer_create_atlas(CTFontRef face, ct_font_renderer_t *handl CGGlyph glyphs[CT_ATLAS_SIZE]; CGRect bounds[CT_ATLAS_SIZE]; CGSize advances[CT_ATLAS_SIZE]; - CGFloat ascent, descent; + float ascent, descent; CGContextRef offscreen; CFStringRef keys[] = { kCTFontAttributeName }; CFDictionaryRef attr; diff --git a/gfx/video_texture.c b/gfx/video_texture.c index 540998fc77..bb444f85a9 100644 --- a/gfx/video_texture.c +++ b/gfx/video_texture.c @@ -27,7 +27,7 @@ static void video_texture_png_load_gl(struct texture_image *ti, unsigned *id) { /* Generate the OpenGL texture object */ - glGenTextures(1, id); + glGenTextures(1, (GLuint*)id); gl_load_texture_data((GLuint)*id, RARCH_WRAP_EDGE, filter_type, 4 /* TODO/FIXME - dehardcode */, diff --git a/griffin/griffin_objc.m b/griffin/griffin_objc.m index 255141d2fc..5dbd1d6fe2 100644 --- a/griffin/griffin_objc.m +++ b/griffin/griffin_objc.m @@ -1,4 +1,4 @@ -#include +#include #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED #define __IPHONE_OS_VERSION_MAX_ALLOWED 00000 diff --git a/input/drivers_joypad/apple_joypad_hid.c b/input/drivers_joypad/apple_joypad_hid.c index 2d7c504528..bb0d169fdc 100644 --- a/input/drivers_joypad/apple_joypad_hid.c +++ b/input/drivers_joypad/apple_joypad_hid.c @@ -124,7 +124,7 @@ static void remove_device(void* context, IOReturn result, void* sender) apple_input_data_t *apple = (apple_input_data_t*)driver->input_data; struct pad_connection* connection = (struct pad_connection*)context; - if (connection && connection->slot < MAX_USERS) + if (connection && (connection->slot < MAX_USERS)) { char msg[PATH_MAX_LENGTH];