Merge pull request #2541 from cold-brewed/media-dialog-path

qt: Global option in preferences to use usr_path as the file image open directory
This commit is contained in:
Miran Grča
2022-07-31 04:50:16 +02:00
committed by GitHub
7 changed files with 99 additions and 68 deletions

View File

@@ -611,6 +611,8 @@ load_general(void)
enable_discord = !!config_get_int(cat, "enable_discord", 0);
open_dir_usr_path = config_get_int(cat, "open_dir_usr_path", 0);
video_framerate = config_get_int(cat, "video_gl_framerate", -1);
video_vsync = config_get_int(cat, "video_gl_vsync", 0);
strncpy(video_shader, config_get_string(cat, "video_gl_shader", ""), sizeof(video_shader));
@@ -2380,6 +2382,11 @@ save_general(void)
else
config_delete_var(cat, "enable_discord");
if (open_dir_usr_path)
config_set_int(cat, "open_dir_usr_path", open_dir_usr_path);
else
config_delete_var(cat, "open_dir_usr_path");
if (video_framerate != -1)
config_set_int(cat, "video_gl_framerate", video_framerate);
else