mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-29 22:25:05 +00:00
Start using const for non-mutating variables
This commit is contained in:
parent
e779c25801
commit
679feefae3
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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(
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user