From be1e3bad3fe5ce3eca7c0670ed98dada2ec1bd86 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 23 Oct 2023 13:04:03 +0200 Subject: Use XDG_VIDEOS_DIR if available --- src/main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index d5de334..4e0d304 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2283,8 +2283,7 @@ static GtkWidget* create_common_settings_page(GtkStack *stack, GtkApplication *a static GtkWidget* create_replay_page(GtkApplication *app, GtkStack *stack) { int row = 0; - std::string video_filepath = get_home_dir(); - video_filepath += "/Videos"; + std::string video_filepath = get_videos_dir(); GtkGrid *grid = GTK_GRID(gtk_grid_new()); gtk_stack_add_named(stack, GTK_WIDGET(grid), "replay"); @@ -2395,8 +2394,7 @@ static GtkWidget* create_replay_page(GtkApplication *app, GtkStack *stack) { static GtkWidget* create_recording_page(GtkApplication *app, GtkStack *stack) { int row = 0; - std::string video_filepath = get_home_dir(); - video_filepath += "/Videos"; + std::string video_filepath = get_videos_dir(); GtkGrid *grid = GTK_GRID(gtk_grid_new()); gtk_stack_add_named(stack, GTK_WIDGET(grid), "recording"); @@ -2665,10 +2663,10 @@ static void load_config(const gpu_info &gpu_inf) { gtk_label_set_text(stream_key_label, "Url: "); if(config.record_config.save_directory.empty() || !is_directory(config.record_config.save_directory.c_str())) - config.record_config.save_directory = get_home_dir() + "/Videos"; + config.record_config.save_directory = get_videos_dir(); if(config.replay_config.save_directory.empty() || !is_directory(config.replay_config.save_directory.c_str())) - config.replay_config.save_directory = get_home_dir() + "/Videos"; + config.replay_config.save_directory = get_videos_dir(); if(config.replay_config.replay_time < 5) config.replay_config.replay_time = 5; -- cgit v1.2.3