aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/MessageQueue.hpp2
-rw-r--r--include/QuickMedia.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/MessageQueue.hpp b/include/MessageQueue.hpp
index 174a227..df331ac 100644
--- a/include/MessageQueue.hpp
+++ b/include/MessageQueue.hpp
@@ -20,9 +20,9 @@ namespace QuickMedia {
}
std::optional<T> pop_wait() {
+ std::unique_lock<std::mutex> lock(mutex);
if(!running)
return std::nullopt;
- std::unique_lock<std::mutex> lock(mutex);
while(data_queue.empty() && running) cv.wait(lock);
if(!running)
return std::nullopt;
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index bdbafef..99bab7a 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -56,7 +56,7 @@ namespace QuickMedia {
private:
void base_event_handler(sf::Event &event, PageType previous_page, Body *body, SearchBar *search_bar, bool handle_key_press = true, bool handle_searchbar = true);
void page_loop(std::vector<Tab> &tabs);
- void video_content_page(Page *page, std::string video_url, std::string video_title);
+ void video_content_page(Page *page, std::string video_url, std::string video_title, bool download_if_streaming_fails);
// Returns -1 to go to previous chapter, 0 to stay on same chapter and 1 to go to next chapter
int image_page(MangaImagesPage *images_page, Body *chapters_body);
void image_continuous_page(MangaImagesPage *images_page);