fix fullscreen config handling

This commit is contained in:
Andrei "Akari" Alexeyev 2017-09-19 17:05:53 +03:00
parent 8aa6f8ea64
commit 99adcc9afe
No known key found for this signature in database
GPG key ID: 048C3D2A5648B785
2 changed files with 7 additions and 4 deletions

View file

@ -326,7 +326,7 @@ void destroy_options_menu(MenuData *m) {
if(!bind)
continue;
if(bind->type == BT_Resolution) {
if(bind->type == BT_Resolution && video_can_change_resolution()) {
if(bind->selected != -1) {
VideoMode *m = video.modes + bind->selected;

View file

@ -458,9 +458,12 @@ void video_resize(int w, int h) {
}
static void video_cfg_fullscreen_callback(ConfigIndex idx, ConfigValue v) {
video.intended.width = config_get_int(CONFIG_VID_WIDTH);
video.intended.height = config_get_int(CONFIG_VID_HEIGHT);
video_set_fullscreen(config_set_int(idx, v.i));
video_set_mode(
config_get_int(CONFIG_VID_WIDTH),
config_get_int(CONFIG_VID_HEIGHT),
config_set_int(idx, v.i),
config_get_int(CONFIG_VID_RESIZABLE)
);
}
static void video_cfg_vsync_callback(ConfigIndex idx, ConfigValue v) {