mirror of
https://github.com/libretro/RetroArch.git
synced 2024-10-07 14:23:29 +00:00
(OSX) Some C89_BUILD fixes
This commit is contained in:
parent
3442f0863f
commit
6141f00f70
@ -142,6 +142,9 @@ void fill_pathname_abbreviate_special(char *out_path,
|
|||||||
#if !defined(RARCH_CONSOLE)
|
#if !defined(RARCH_CONSOLE)
|
||||||
void fill_pathname_application_path(char *buf, size_t size)
|
void fill_pathname_application_path(char *buf, size_t size)
|
||||||
{
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
CFBundleRef bundle = CFBundleGetMainBundle();
|
||||||
|
#endif
|
||||||
size_t i;
|
size_t i;
|
||||||
(void)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);
|
DWORD ret = GetModuleFileName(GetModuleHandle(NULL), buf, size - 1);
|
||||||
buf[ret] = '\0';
|
buf[ret] = '\0';
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
CFBundleRef bundle = CFBundleGetMainBundle();
|
|
||||||
if (bundle)
|
if (bundle)
|
||||||
{
|
{
|
||||||
CFURLRef bundle_url = CFBundleCopyBundleURL(bundle);
|
CFURLRef bundle_url = CFBundleCopyBundleURL(bundle);
|
||||||
|
@ -77,13 +77,13 @@ static bool font_renderer_create_atlas(CTFontRef face, ct_font_renderer_t *handl
|
|||||||
CGSize advances[CT_ATLAS_SIZE];
|
CGSize advances[CT_ATLAS_SIZE];
|
||||||
float ascent, descent;
|
float ascent, descent;
|
||||||
CGContextRef offscreen;
|
CGContextRef offscreen;
|
||||||
CFStringRef keys[] = { kCTFontAttributeName };
|
|
||||||
CFDictionaryRef attr;
|
CFDictionaryRef attr;
|
||||||
void *bitmapData = NULL;
|
void *bitmapData = NULL;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
size_t bitsPerComponent = 8;
|
size_t bitsPerComponent = 8;
|
||||||
UniChar characters[CT_ATLAS_SIZE] = {0};
|
UniChar characters[CT_ATLAS_SIZE] = {0};
|
||||||
CFTypeRef values[] = { face };
|
CFTypeRef values[] = { face };
|
||||||
|
CFStringRef keys[] = { kCTFontAttributeName };
|
||||||
|
|
||||||
for (i = 0; i < CT_ATLAS_SIZE; i++)
|
for (i = 0; i < CT_ATLAS_SIZE; i++)
|
||||||
characters[i] = (UniChar)i;
|
characters[i] = (UniChar)i;
|
||||||
|
@ -112,6 +112,7 @@ static void input_autoconfigure_joypad_add(
|
|||||||
config_file_t *conf,
|
config_file_t *conf,
|
||||||
autoconfig_params_t *params)
|
autoconfig_params_t *params)
|
||||||
{
|
{
|
||||||
|
bool block_osd_spam;
|
||||||
char msg[PATH_MAX_LENGTH] = {0};
|
char msg[PATH_MAX_LENGTH] = {0};
|
||||||
char display_name[PATH_MAX_LENGTH] = {0};
|
char display_name[PATH_MAX_LENGTH] = {0};
|
||||||
char device_type[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_display_name", display_name, sizeof(display_name));
|
||||||
config_get_array(conf, "input_device_type", device_type, sizeof(device_type));
|
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)
|
if (!settings)
|
||||||
return;
|
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;
|
settings->input.autoconfigured[params->idx] = true;
|
||||||
input_autoconfigure_joypad_conf(conf,
|
input_autoconfigure_joypad_conf(conf,
|
||||||
settings->input.autoconf_binds[params->idx]);
|
settings->input.autoconf_binds[params->idx]);
|
||||||
|
Loading…
Reference in New Issue
Block a user