mirror of
https://github.com/libretro/RetroArch
synced 2025-02-08 15:40:14 +00:00
Warning fixes
This commit is contained in:
parent
2f6ba7f477
commit
eba83390ba
2
deps/math-neon/source/math_coshf.c
vendored
2
deps/math-neon/source/math_coshf.c
vendored
@ -117,4 +117,4 @@ float coshf_neon_sfp(float x)
|
||||
#else
|
||||
return coshf_c(x);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
2
deps/math-neon/source/math_mat3.c
vendored
2
deps/math-neon/source/math_mat3.c
vendored
@ -106,7 +106,7 @@ void
|
||||
matvec3_neon(float m[9], float v[3], float d[3])
|
||||
{
|
||||
#ifdef __MATH_NEON
|
||||
int tmp;
|
||||
int tmp = 0;
|
||||
asm volatile (
|
||||
"mov %3, #12 \n\t" //r3 = 12
|
||||
"vld1.32 {d0, d1}, [%1] \n\t" //Q0 = v
|
||||
|
6
deps/math-neon/source/math_sincosf.c
vendored
6
deps/math-neon/source/math_sincosf.c
vendored
@ -48,11 +48,11 @@ void sincosf_c( float x, float r[2])
|
||||
int i;
|
||||
} ax, bx;
|
||||
|
||||
float y;
|
||||
float a, b, c, d, xx, yy;
|
||||
float xx, yy;
|
||||
int m, n, o, p;
|
||||
|
||||
y = x + __sincosf_rng[1];
|
||||
float y = x + __sincosf_rng[1];
|
||||
|
||||
ax.f = fabsf(x);
|
||||
bx.f = fabsf(y);
|
||||
|
||||
|
2
deps/math-neon/source/math_sqrtf.c
vendored
2
deps/math-neon/source/math_sqrtf.c
vendored
@ -102,4 +102,4 @@ float sqrtf_neon_sfp(float x)
|
||||
#else
|
||||
return sqrtf_c(x);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
@ -318,9 +318,11 @@ static void frontend_psp_init(void *data)
|
||||
static void frontend_psp_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER) || defined(VITA)
|
||||
char argp[512] = {0};
|
||||
#ifdef IS_SALAMANDER
|
||||
char boot_params[1024];
|
||||
char core_name[256];
|
||||
#endif
|
||||
char argp[512] = {0};
|
||||
SceSize args = 0;
|
||||
|
||||
#if !defined(VITA)
|
||||
@ -342,13 +344,15 @@ static void frontend_psp_exec(const char *path, bool should_load_game)
|
||||
RARCH_LOG("Attempt to load executable: %d [%s].\n", args, argp);
|
||||
#ifdef IS_SALAMANDER
|
||||
sceAppMgrGetAppParam(boot_params);
|
||||
if (strstr(boot_params,"psgm:play")) {
|
||||
if (strstr(boot_params,"psgm:play"))
|
||||
{
|
||||
int ret;
|
||||
char *param1 = strstr(boot_params, "¶m=")+7;
|
||||
char *param2 = strstr(boot_params, "¶m2=");
|
||||
memcpy(core_name, param1, param2 - param1);
|
||||
core_name[param2-param1] = 0;
|
||||
sprintf(argp, param2 + 8);
|
||||
int ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL);
|
||||
ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL);
|
||||
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
||||
}
|
||||
else
|
||||
|
@ -458,7 +458,6 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita,
|
||||
static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width,
|
||||
unsigned viewport_height, bool force_full, bool allow_rotate)
|
||||
{
|
||||
gfx_ctx_aspect_t aspect_data;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
float device_aspect = (float)viewport_width / viewport_height;
|
||||
@ -468,10 +467,6 @@ static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width,
|
||||
bool video_scale_integer = settings->bools.video_scale_integer;
|
||||
unsigned aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
|
||||
|
||||
aspect_data.aspect = &device_aspect;
|
||||
aspect_data.width = viewport_width;
|
||||
aspect_data.height = viewport_height;
|
||||
|
||||
if (video_scale_integer && !force_full)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&vita->vp,
|
||||
|
@ -131,9 +131,6 @@ static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
||||
vertices[i].a = *color++;
|
||||
}
|
||||
|
||||
const math_matrix_4x4 *mat = draw->matrix_data
|
||||
? (const math_matrix_4x4*)draw->matrix_data : (const math_matrix_4x4*)gfx_display_vita2d_get_default_mvp(vita2d);
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
{
|
||||
default:
|
||||
|
@ -410,33 +410,31 @@ static bool psp_input_set_sensor_state(void *data, unsigned port,
|
||||
if(!psp)
|
||||
return false;
|
||||
|
||||
switch(action)
|
||||
switch (action)
|
||||
{
|
||||
case RETRO_SENSOR_ILLUMINANCE_ENABLE:
|
||||
return false;
|
||||
|
||||
case RETRO_SENSOR_ILLUMINANCE_DISABLE:
|
||||
return true;
|
||||
|
||||
case RETRO_SENSOR_ACCELEROMETER_DISABLE:
|
||||
case RETRO_SENSOR_GYROSCOPE_DISABLE:
|
||||
if(psp->sensors_enabled)
|
||||
{
|
||||
psp->sensors_enabled = false;
|
||||
sceMotionMagnetometerOff();
|
||||
sceMotionStopSampling();
|
||||
psp->sensors_enabled = false;
|
||||
sceMotionMagnetometerOff();
|
||||
sceMotionStopSampling();
|
||||
}
|
||||
return true;
|
||||
|
||||
case RETRO_SENSOR_ACCELEROMETER_ENABLE:
|
||||
case RETRO_SENSOR_GYROSCOPE_ENABLE:
|
||||
if(!psp->sensors_enabled)
|
||||
{
|
||||
psp->sensors_enabled = true;
|
||||
sceMotionStartSampling();
|
||||
sceMotionMagnetometerOn();
|
||||
psp->sensors_enabled = true;
|
||||
sceMotionStartSampling();
|
||||
sceMotionMagnetometerOn();
|
||||
}
|
||||
return true;
|
||||
case RETRO_SENSOR_DUMMY:
|
||||
case RETRO_SENSOR_ILLUMINANCE_ENABLE:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -217,9 +217,9 @@ int getaddrinfo_retro(const char *node, const char *service,
|
||||
|
||||
if (!node && (hints->ai_flags & AI_PASSIVE))
|
||||
in_addr->sin_addr.s_addr = INADDR_ANY;
|
||||
else if (node && isdigit(*node))
|
||||
else if (node && isdigit((unsigned char)*node))
|
||||
in_addr->sin_addr.s_addr = inet_addr(node);
|
||||
else if (node && !isdigit(*node))
|
||||
else if (node && !isdigit((unsigned char)*node))
|
||||
{
|
||||
struct hostent *host = (struct hostent*)gethostbyname(node);
|
||||
|
||||
|
@ -91,10 +91,7 @@ bool natt_new(struct natt_status *status)
|
||||
return true;
|
||||
}
|
||||
|
||||
void natt_free(struct natt_status *status)
|
||||
{
|
||||
/* Nothing */
|
||||
}
|
||||
void natt_free(struct natt_status *status) { }
|
||||
|
||||
static bool natt_open_port(struct natt_status *status,
|
||||
struct sockaddr *addr, socklen_t addrlen, enum socket_protocol proto)
|
||||
|
@ -89,7 +89,9 @@ static struct netplay_host_list discovered_hosts;
|
||||
static size_t discovered_hosts_allocated;
|
||||
|
||||
/* Forward declarations */
|
||||
#ifdef HAVE_NETPLAYDISCOVERY
|
||||
static bool netplay_lan_ad_client(void);
|
||||
#endif
|
||||
|
||||
/** Initialize Netplay discovery (client) */
|
||||
bool init_netplay_discovery(void)
|
||||
@ -201,6 +203,7 @@ bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state,
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETPLAYDISCOVERY
|
||||
static bool init_lan_ad_server_socket(netplay_t *netplay, uint16_t port)
|
||||
{
|
||||
struct addrinfo *addr = NULL;
|
||||
@ -226,6 +229,7 @@ error:
|
||||
RARCH_ERR("[discovery] Failed to initialize netplay advertisement socket\n");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* netplay_lan_ad_server
|
||||
@ -404,6 +408,8 @@ bool netplay_lan_ad_server(netplay_t *netplay)
|
||||
}
|
||||
|
||||
#ifdef HAVE_SOCKET_LEGACY
|
||||
|
||||
#ifndef htons
|
||||
/* The fact that I need to write this is deeply depressing */
|
||||
static int16_t htons_for_morons(int16_t value)
|
||||
{
|
||||
@ -414,11 +420,12 @@ static int16_t htons_for_morons(int16_t value)
|
||||
val.l = htonl(value);
|
||||
return val.s[1];
|
||||
}
|
||||
#ifndef htons
|
||||
#define htons htons_for_morons
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETPLAYDISCOVERY
|
||||
static bool netplay_lan_ad_client(void)
|
||||
{
|
||||
unsigned i;
|
||||
@ -547,3 +554,4 @@ static bool netplay_lan_ad_client(void)
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user