aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--src/QuickMedia.cpp9
2 files changed, 8 insertions, 4 deletions
diff --git a/TODO b/TODO
index 5c8c2ca..3e13fa9 100644
--- a/TODO
+++ b/TODO
@@ -104,4 +104,5 @@ Allow choosing which translation/scanlation to use on mangadex. Right now it use
Add file upload to 4chan.
Retry download if it fails, at least 3 times (observed to be needed for mangadex images).
Readd autocomplete, but make it better with a proper list. Also readd 4chan login page and manganelo creators page.
-Fix logout/login in matrix. Currently it doesn't work because data is cleared while sync is in progress, leading to the first sync sometimes being with previous data... \ No newline at end of file
+Fix logout/login in matrix. Currently it doesn't work because data is cleared while sync is in progress, leading to the first sync sometimes being with previous data...
+Modify sfml to use GL_COMPRESSED_LUMINANCE and other texture compression modes (in sf::Texture). This reduces memory usage by half. \ No newline at end of file
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);