aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 01e244a..e34f991 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -934,8 +934,9 @@ namespace QuickMedia {
int selected_tab = 0;
bool loop_running = true;
+ bool redraw = true;
- auto submit_handler = [this, &tabs, &selected_tab, &loop_running]() {
+ auto submit_handler = [this, &tabs, &selected_tab, &loop_running, &redraw]() {
BodyItem *selected_item = tabs[selected_tab].body->get_selected();
if(!selected_item)
return;
@@ -994,12 +995,15 @@ namespace QuickMedia {
}
}
window.setKeyRepeatEnabled(true);
+ redraw = true;
} else if(new_tabs.size() == 1 && new_tabs[0].page->is_image_board_thread_page()) {
current_page = PageType::IMAGE_BOARD_THREAD;
image_board_thread_page(static_cast<ImageBoardThreadPage*>(new_tabs[0].page.get()), new_tabs[0].body.get());
+ redraw = true;
} else if(new_tabs.size() == 1 && new_tabs[0].page->is_video_page()) {
current_page = PageType::VIDEO_CONTENT;
video_content_page(new_tabs[0].page.get(), selected_item->url, selected_item->get_title());
+ redraw = true;
} else {
page_loop(std::move(new_tabs));
}
@@ -1042,7 +1046,6 @@ namespace QuickMedia {
sf::Vector2f body_pos;
sf::Vector2f body_size;
- bool redraw = true;
sf::Event event;
const float tab_spacer_height = 0.0f;
@@ -1804,7 +1807,7 @@ namespace QuickMedia {
if(image.loadFromFile(image_path.data)) {
if(image_texture.loadFromImage(image)) {
image_texture.setSmooth(true);
- image_texture.generateMipmap();
+ //image_texture.generateMipmap();
return LoadImageResult::OK;
} else {
error_message = std::string("Failed to load image for page ") + std::to_string(image_index + 1);