mirror of
https://github.com/libretro/RetroArch
synced 2025-04-23 11:43:20 +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);
|
config_file_t *conf = config_file_new(path);
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
global_t *global = global_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)
|
if (!conf)
|
||||||
conf = config_file_new(NULL);
|
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)
|
static void gl_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||||
{
|
{
|
||||||
gl_t *gl = (gl_t*)data;
|
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)
|
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();
|
driver_t *driver = driver_get_ptr();
|
||||||
gx_video_t *gx = (gx_video_t*)driver->video_data;
|
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)
|
if (aspect_ratio_idx == ASPECT_RATIO_SQUARE)
|
||||||
video_viewport_set_square_pixel(
|
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)
|
static void sdl2_poke_set_aspect_ratio(void *data, unsigned aspectratio_index)
|
||||||
{
|
{
|
||||||
sdl2_video_t *vid = (sdl2_video_t*)data;
|
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)
|
switch (aspectratio_index)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user