diff --git a/configuration.c b/configuration.c index 95d874b06f..218785aa4f 100644 --- a/configuration.c +++ b/configuration.c @@ -2229,7 +2229,7 @@ bool config_save_file(const char *path) config_file_t *conf = config_file_new(path); settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); - video_viewport_t *custom_vp = video_viewport_get_custom(); + const video_viewport_t *custom_vp = (const video_viewport_t*)video_viewport_get_custom(); if (!conf) conf = config_file_new(NULL); diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 691fb9ee82..de7e573ecd 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -3099,7 +3099,8 @@ static retro_proc_address_t gl_get_proc_address(void *data, const char *sym) static void gl_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) { gl_t *gl = (gl_t*)data; - struct retro_system_av_info *av_info = video_viewport_get_system_av_info(); + const struct retro_system_av_info *av_info = + (const struct retro_system_av_info*)video_viewport_get_system_av_info(); switch (aspect_ratio_idx) { diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index 2b4b7c5d86..c52092cdea 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -433,7 +433,8 @@ static void gx_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) { driver_t *driver = driver_get_ptr(); gx_video_t *gx = (gx_video_t*)driver->video_data; - struct retro_system_av_info *av_info = video_viewport_get_system_av_info(); + const struct retro_system_av_info *av_info = + (const struct retro_system_av_info*)video_viewport_get_system_av_info(); if (aspect_ratio_idx == ASPECT_RATIO_SQUARE) video_viewport_set_square_pixel( diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 5b7b2e111a..dd5d4d2b42 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -639,7 +639,8 @@ void sdl2_poke_set_filtering(void *data, unsigned index, bool smooth) static void sdl2_poke_set_aspect_ratio(void *data, unsigned aspectratio_index) { sdl2_video_t *vid = (sdl2_video_t*)data; - struct retro_system_av_info *av_info = video_viewport_get_system_av_info(); + const struct retro_system_av_info *av_info = + (const struct retro_system_av_info*)video_viewport_get_system_av_info(); switch (aspectratio_index) { diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index cc1155f485..78ad1f869b 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -501,7 +501,7 @@ static void *xv_init(const video_info_t *video, attributes.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask | ButtonReleaseMask | ButtonPressMask | DestroyNotify | ClientMessage; - width = video->fullscreen ? ((video->width == 0) ? geom->base_width : video->width) : video->width; + width = video->fullscreen ? ( (video->width == 0) ? geom->base_width : video->width) : video->width; height = video->fullscreen ? ((video->height == 0) ? geom->base_height : video->height) : video->height; xv->window = XCreateWindow(xv->display, DefaultRootWindow(xv->display), 0, 0, width, height, @@ -531,7 +531,7 @@ static void *xv_init(const video_info_t *video, if (atom != None) XvSetPortAttribute(xv->display, xv->port, atom, 1); - xv->width = geom->max_width; + xv->width = geom->max_width; xv->height = geom->max_height; xv->image = XvShmCreateImage(xv->display, xv->port, xv->fourcc,