(OSX) Some C89_BUILD fixes

This commit is contained in:
Twinaphex 2015-10-12 21:02:07 +02:00
parent 3442f0863f
commit 6141f00f70
3 changed files with 10 additions and 7 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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]);