mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
change the approach to wii resolution changing, this is more stable
This commit is contained in:
parent
eadaad57da
commit
2aa7c46e78
@ -165,7 +165,7 @@ enum
|
||||
GX_RESOLUTIONS_LAST,
|
||||
};
|
||||
|
||||
static unsigned menu_current_gx_resolution = GX_RESOLUTIONS_640_480;
|
||||
static unsigned menu_current_gx_resolution = GX_RESOLUTIONS_448_448;
|
||||
|
||||
unsigned menu_gx_resolutions[GX_RESOLUTIONS_LAST][2] = {
|
||||
{ 512, 192 },
|
||||
@ -474,7 +474,7 @@ static void setup_video_mode(void *data)
|
||||
|
||||
VIDEO_GetPreferredMode(&gx_mode);
|
||||
global_t *global = global_get_ptr();
|
||||
gx_set_video_mode(data, global->console.screen.resolutions.width, global->console.screen.resolutions.height, true);
|
||||
gx_set_video_mode(data, 0, 0, true);
|
||||
}
|
||||
|
||||
static void init_texture(void *data, unsigned width, unsigned height)
|
||||
|
@ -1711,6 +1711,10 @@ static int action_ok_video_resolution(const char *path,
|
||||
video_driver_set_video_mode(width, height, true);
|
||||
global->console.screen.resolutions.width = width;
|
||||
global->console.screen.resolutions.height = height;
|
||||
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
snprintf(msg, sizeof(msg),"Applying: %dx%d\n START to reset",width, height);
|
||||
rarch_main_msg_queue_push(msg, 1, 100, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -270,9 +270,20 @@ static int action_start_video_resolution(const char *path,
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
(void)global;
|
||||
(void)width;
|
||||
(void)height;
|
||||
|
||||
video_driver_set_video_mode(640, 480, true);
|
||||
if (video_driver_get_video_output_size(&width, &height))
|
||||
{
|
||||
video_driver_set_video_mode(width, height, true);
|
||||
global->console.screen.resolutions.width = width;
|
||||
global->console.screen.resolutions.height = height;
|
||||
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
snprintf(msg, sizeof(msg),"Resetting to: %dx%d",width, height);
|
||||
rarch_main_msg_queue_push(msg, 1, 100, true);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
13
retroarch.c
13
retroarch.c
@ -1266,6 +1266,19 @@ int rarch_main_init(int argc, char *argv[])
|
||||
event_command(EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
video_driver_set_aspect_ratio(settings->video.aspect_ratio_idx);
|
||||
}
|
||||
|
||||
unsigned width = 0, height = 0;
|
||||
|
||||
(void)width;
|
||||
(void)height;
|
||||
|
||||
width = global->console.screen.resolutions.width;
|
||||
height = global->console.screen.resolutions.height;
|
||||
video_driver_set_video_mode(width, height, true);
|
||||
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
snprintf(msg, sizeof(msg),"Resolution: %dx%d",width, height);
|
||||
rarch_main_msg_queue_push(msg, 1, 100, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user