aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Body.cpp4
-rw-r--r--src/QuickMedia.cpp22
2 files changed, 13 insertions, 13 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 076d093..25faa1f 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -435,8 +435,8 @@ namespace QuickMedia {
pos.y = 0.0f;
float frame_time = frame_timer.restart().asSeconds();
- if(frame_time > 1.0f)
- frame_time = 1.0f;
+ if(frame_time > 0.01666f)
+ frame_time = 0.01666f;
if(selected_item >= (int)items.size())
selected_item = (int)items.size() - 1;
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 5bbad84..42b7106 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -502,7 +502,7 @@ namespace QuickMedia {
std::filesystem::path home_path = get_home_dir().data;
if(file_manager_start_dir.empty())
- file_manager_start_dir = FileManagerPage::get_last_accessed_directory(home_path);
+ file_manager_start_dir = home_path;
int start_tab_index = 0;
FileManagerMimeType fm_mine_type = FILE_MANAGER_MIME_TYPE_ALL;
@@ -697,8 +697,8 @@ namespace QuickMedia {
if(create_directory_recursive(get_cache_dir().join("thumbnails")) != 0)
throw std::runtime_error("Failed to create thumbnails directory");
- if(create_directory_recursive(get_storage_dir().join("file-manager")) != 0)
- throw std::runtime_error("Failed to create file-manager directory");
+ //if(create_directory_recursive(get_storage_dir().join("file-manager")) != 0)
+ // throw std::runtime_error("Failed to create file-manager directory");
const char *qm_phone_factor = getenv("QM_PHONE_FACTOR");
if(qm_phone_factor && atoi(qm_phone_factor) == 1)
@@ -2310,7 +2310,7 @@ namespace QuickMedia {
void Program::video_page_download_video(const std::string &url, bool use_youtube_dl, sf::WindowHandle video_player_window) {
if(!use_youtube_dl) {
- download_async_gui(url, FileManagerPage::get_last_accessed_directory(file_manager_start_dir).string(), use_youtube_dl, no_video);
+ download_async_gui(url, file_manager_start_dir.string(), use_youtube_dl, no_video);
return;
}
@@ -2342,7 +2342,7 @@ namespace QuickMedia {
if(!selected)
return;
- download_async_gui(url, FileManagerPage::get_last_accessed_directory(file_manager_start_dir).string(), true, audio_only);
+ download_async_gui(url, file_manager_start_dir.string(), true, audio_only);
}
#define CLEANMASK(mask) ((mask) & (ShiftMask|ControlMask|Mod1Mask|Mod4Mask|Mod5Mask))
@@ -3518,7 +3518,7 @@ namespace QuickMedia {
}
}
} else if(event.key.code == sf::Keyboard::U) {
- std::filesystem::path &fm_dir = FileManagerPage::get_last_accessed_directory(file_manager_start_dir);
+ std::filesystem::path &fm_dir = file_manager_start_dir;
auto file_manager_page = std::make_unique<FileManagerPage>(this, (FileManagerMimeType)(FILE_MANAGER_MIME_TYPE_IMAGE|FILE_MANAGER_MIME_TYPE_VIDEO));
file_manager_page->set_current_directory(fm_dir.string());
auto file_manager_body = create_body();
@@ -3564,7 +3564,7 @@ namespace QuickMedia {
} else if(event.key.code == sf::Keyboard::S && event.key.control) {
BodyItem *selected_item = thread_body->get_selected();
if(selected_item && !selected_item->url.empty())
- download_async_gui(selected_item->url, FileManagerPage::get_last_accessed_directory(file_manager_start_dir).string(), false, false);
+ download_async_gui(selected_item->url, file_manager_start_dir.string(), false, false);
}
BodyItem *selected_item = thread_body->get_selected();
@@ -3681,7 +3681,7 @@ namespace QuickMedia {
redraw = true;
frame_skip_text_entry = true;
} else if(event.key.code == sf::Keyboard::S && event.key.control) {
- download_async_gui(attached_image_url, FileManagerPage::get_last_accessed_directory(file_manager_start_dir).string(), false, false);
+ download_async_gui(attached_image_url, file_manager_start_dir.string(), false, false);
}
}
}
@@ -5051,7 +5051,7 @@ namespace QuickMedia {
avatar_applied = false;
return true;
} else if(message_type == MessageType::FILE) {
- download_async_gui(selected->url, FileManagerPage::get_last_accessed_directory(file_manager_start_dir).string(), false, no_video);
+ download_async_gui(selected->url, file_manager_start_dir.string(), false, no_video);
return true;
}
@@ -5092,7 +5092,7 @@ namespace QuickMedia {
if(selected_item_message) {
MessageType message_type = selected_item_message->type;
if(!selected->url.empty() && message_type >= MessageType::IMAGE && message_type <= MessageType::FILE) {
- download_async_gui(selected->url, FileManagerPage::get_last_accessed_directory(file_manager_start_dir).string(), false, no_video);
+ download_async_gui(selected->url, file_manager_start_dir.string(), false, no_video);
return true;
}
}
@@ -5522,7 +5522,7 @@ namespace QuickMedia {
tab.body->clear_cache();
}
- std::filesystem::path &fm_dir = FileManagerPage::get_last_accessed_directory(file_manager_start_dir);
+ std::filesystem::path &fm_dir = file_manager_start_dir;
auto file_manager_page = std::make_unique<FileManagerPage>(this);
file_manager_page->set_current_directory(fm_dir.string());
auto file_manager_body = create_body();