mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Trivial warnings fixes (#15383)
* Trivial graphics context drivers fix * Assorted minor warnings fixes
This commit is contained in:
parent
d342a4a04a
commit
de0c6d5cd1
@ -16,11 +16,12 @@
|
||||
#ifdef HAVE_LIBDECOR_H
|
||||
RA_WAYLAND_MODULE(WAYLAND_LIBDECOR)
|
||||
RA_WAYLAND_SYM(void, libdecor_unref, (struct libdecor *))
|
||||
RA_WAYLAND_SYM(struct libdecor *, libdecor_new, (struct wl_display *, struct libdecor_interface *))
|
||||
RA_WAYLAND_SYM(struct libdecor *, libdecor_new, (struct wl_display *,\
|
||||
const struct libdecor_interface *))
|
||||
RA_WAYLAND_SYM(int, libdecor_dispatch, (struct libdecor *, int timeout))
|
||||
RA_WAYLAND_SYM(struct libdecor_frame *, libdecor_decorate, (struct libdecor *,\
|
||||
struct wl_surface *,\
|
||||
struct libdecor_frame_interface *,\
|
||||
const struct libdecor_frame_interface *,\
|
||||
void *))
|
||||
RA_WAYLAND_SYM(void, libdecor_frame_unref, (struct libdecor_frame *))
|
||||
RA_WAYLAND_SYM(void, libdecor_frame_set_title, (struct libdecor_frame *, const char *))
|
||||
|
@ -52,7 +52,6 @@ static bool kms_display_server_set_resolution(void *data,
|
||||
{
|
||||
unsigned curr_width = 0;
|
||||
unsigned curr_height = 0;
|
||||
unsigned curr_bpp = 0;
|
||||
float curr_refreshrate = 0;
|
||||
bool retval = false;
|
||||
int reinit_flags = DRIVERS_CMD_ALL;
|
||||
@ -66,7 +65,6 @@ static bool kms_display_server_set_resolution(void *data,
|
||||
curr_refreshrate = drm_calc_refresh_rate(g_drm_mode);
|
||||
curr_width = g_drm_mode->hdisplay;
|
||||
curr_height = g_drm_mode->vdisplay;
|
||||
curr_bpp = 32;
|
||||
}
|
||||
RARCH_DBG("[DRM]: Display server set resolution - incoming: %d x %d, %f Hz\n",width, height, hz);
|
||||
|
||||
@ -74,8 +72,6 @@ static bool kms_display_server_set_resolution(void *data,
|
||||
width = curr_width;
|
||||
if (height == 0)
|
||||
height = curr_height;
|
||||
if (curr_bpp == 0)
|
||||
curr_bpp = curr_bpp;
|
||||
if (hz == 0)
|
||||
hz = curr_refreshrate;
|
||||
|
||||
|
@ -270,7 +270,7 @@ static bool gfx_ctx_wl_egl_init_context(gfx_ctx_wayland_data_t *wl)
|
||||
egl_report_error();
|
||||
return false;
|
||||
}
|
||||
if (n == 0 || !&wl->egl.config)
|
||||
if (n == 0 || !wl->egl.config)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ static void *gfx_ctx_xegl_init(void *video_driver)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (n == 0 || !&xegl->egl.config)
|
||||
if (n == 0 || !xegl->egl.config)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
|
@ -128,7 +128,7 @@ static void crt_switch_set_aspect(
|
||||
sr_state state;
|
||||
sr_get_state(&state);
|
||||
|
||||
if (srm_width >= state.super_width && !srm_isstretched)
|
||||
if ((int)srm_width >= state.super_width && !srm_isstretched)
|
||||
RARCH_LOG("[CRT]: Super resolution detected. Fractal scaling @ X:%f Y:%f \n", srm_xscale, srm_yscale);
|
||||
else if (srm_isstretched && srm_width > 0 )
|
||||
RARCH_LOG("[CRT]: Resolution is stretched. Fractal scaling @ X:%f Y:%f \n", srm_xscale, srm_yscale);
|
||||
|
@ -96,13 +96,13 @@ typedef struct surface_output
|
||||
struct wl_list link;
|
||||
} surface_output_t;
|
||||
|
||||
typedef struct gfx_ctx_wayland_data gfx_ctx_wayland_data_t;
|
||||
struct gfx_ctx_wayland_data;
|
||||
|
||||
typedef struct input_ctx_wayland_data
|
||||
{
|
||||
struct wl_display *dpy;
|
||||
const input_device_driver_t *joypad;
|
||||
gfx_ctx_wayland_data_t *gfx;
|
||||
struct gfx_ctx_wayland_data *gfx;
|
||||
|
||||
int fd;
|
||||
|
||||
|
@ -833,8 +833,9 @@ void cpu_features_get_model_name(char *name, int len)
|
||||
{
|
||||
#if defined(CPU_X86) && !defined(__MACH__)
|
||||
union {
|
||||
int i[4];
|
||||
unsigned char s[16];
|
||||
int32_t i[4];
|
||||
uint32_t u[4];
|
||||
uint8_t s[16];
|
||||
} flags;
|
||||
int i, j;
|
||||
int pos = 0;
|
||||
@ -845,7 +846,8 @@ void cpu_features_get_model_name(char *name, int len)
|
||||
|
||||
x86_cpuid(0x80000000, flags.i);
|
||||
|
||||
if (flags.i[0] < 0x80000004)
|
||||
/* Check for additional cpuid attributes availability */
|
||||
if (flags.u[0] < 0x80000004)
|
||||
return;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
|
@ -421,6 +421,7 @@ static INLINE UINT32 get_bigendian_uint32(const UINT8 *base)
|
||||
the data stream in bigendian order
|
||||
-------------------------------------------------*/
|
||||
|
||||
#if 0
|
||||
static INLINE void put_bigendian_uint32(UINT8 *base, UINT32 value)
|
||||
{
|
||||
base[0] = value >> 24;
|
||||
@ -428,6 +429,7 @@ static INLINE void put_bigendian_uint32(UINT8 *base, UINT32 value)
|
||||
base[2] = value >> 8;
|
||||
base[3] = value;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------
|
||||
put_bigendian_uint24 - write a UINT24 to
|
||||
@ -491,6 +493,7 @@ static INLINE void map_extract(const UINT8 *base, map_entry *entry)
|
||||
entry to the datastream
|
||||
-------------------------------------------------*/
|
||||
|
||||
#if 0
|
||||
static INLINE void map_assemble(UINT8 *base, map_entry *entry)
|
||||
{
|
||||
put_bigendian_uint64(&base[0], entry->offset);
|
||||
@ -499,6 +502,7 @@ static INLINE void map_assemble(UINT8 *base, map_entry *entry)
|
||||
base[14] = entry->length >> 16;
|
||||
base[15] = entry->flags;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------
|
||||
map_size_v5 - calculate CHDv5 map size
|
||||
|
Loading…
Reference in New Issue
Block a user