diff --git a/file_path_special.c b/file_path_special.c index d34ec77a4a..0c9cb94f5c 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -142,6 +142,9 @@ void fill_pathname_abbreviate_special(char *out_path, #if !defined(RARCH_CONSOLE) void fill_pathname_application_path(char *buf, size_t size) { +#ifdef __APPLE__ + CFBundleRef bundle = CFBundleGetMainBundle(); +#endif size_t i; (void)i; @@ -152,7 +155,6 @@ void fill_pathname_application_path(char *buf, size_t size) DWORD ret = GetModuleFileName(GetModuleHandle(NULL), buf, size - 1); buf[ret] = '\0'; #elif defined(__APPLE__) - CFBundleRef bundle = CFBundleGetMainBundle(); if (bundle) { CFURLRef bundle_url = CFBundleCopyBundleURL(bundle); diff --git a/gfx/drivers_font_renderer/coretext.c b/gfx/drivers_font_renderer/coretext.c index 9956f8f635..e648953caf 100644 --- a/gfx/drivers_font_renderer/coretext.c +++ b/gfx/drivers_font_renderer/coretext.c @@ -77,13 +77,13 @@ static bool font_renderer_create_atlas(CTFontRef face, ct_font_renderer_t *handl CGSize advances[CT_ATLAS_SIZE]; float ascent, descent; CGContextRef offscreen; - CFStringRef keys[] = { kCTFontAttributeName }; CFDictionaryRef attr; void *bitmapData = NULL; bool ret = true; size_t bitsPerComponent = 8; UniChar characters[CT_ATLAS_SIZE] = {0}; CFTypeRef values[] = { face }; + CFStringRef keys[] = { kCTFontAttributeName }; for (i = 0; i < CT_ATLAS_SIZE; i++) characters[i] = (UniChar)i; diff --git a/input/input_autodetect.c b/input/input_autodetect.c index 24f5d3d079..b442915073 100644 --- a/input/input_autodetect.c +++ b/input/input_autodetect.c @@ -112,6 +112,7 @@ static void input_autoconfigure_joypad_add( config_file_t *conf, autoconfig_params_t *params) { + bool block_osd_spam; char msg[PATH_MAX_LENGTH] = {0}; char display_name[PATH_MAX_LENGTH] = {0}; char device_type[PATH_MAX_LENGTH] = {0}; @@ -120,14 +121,14 @@ static void input_autoconfigure_joypad_add( config_get_array(conf, "input_device_display_name", display_name, sizeof(display_name)); config_get_array(conf, "input_device_type", device_type, sizeof(device_type)); - /* This will be the case if input driver is reinitialized. - * No reason to spam autoconfigure messages every time. */ - bool block_osd_spam = settings && - settings->input.autoconfigured[params->idx] && *params->name; - if (!settings) return; + /* This will be the case if input driver is reinitialized. + * No reason to spam autoconfigure messages every time. */ + block_osd_spam = settings->input.autoconfigured[params->idx] + && *params->name; + settings->input.autoconfigured[params->idx] = true; input_autoconfigure_joypad_conf(conf, settings->input.autoconf_binds[params->idx]);