From 8f3a02d85965756c4cbf31603ca04bd5dd205904 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Thu, 22 May 2014 15:11:19 -0500 Subject: [PATCH] Save gamelist.xml after each game is scraped in multi-scrape mode. Show more detailed breakdown of VRAM. Looks like there's a bug with duplicate fonts right now. --- src/Window.cpp | 6 ++++-- src/guis/GuiScraperMulti.cpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Window.cpp b/src/Window.cpp index 13f82568d..b7d418dc3 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -157,8 +157,10 @@ void Window::update(int deltaTime) ss << std::fixed << std::setprecision(2) << ((float)mFrameTimeElapsed / (float)mFrameCountElapsed) << "ms"; // vram - float vramUsageMb = (TextureResource::getTotalMemUsage() + Font::getTotalMemUsage()) / 1000.0f / 1000.0f; - ss << "\nVRAM: " << vramUsageMb << "mb"; + float textureVramUsageMb = TextureResource::getTotalMemUsage() / 1000.0f / 1000.0f;; + float fontVramUsageMb = Font::getTotalMemUsage() / 1000.0f / 1000.0f;; + float totalVramUsageMb = textureVramUsageMb + fontVramUsageMb; + ss << "\nVRAM: " << totalVramUsageMb << "mb (texs: " << textureVramUsageMb << "mb, fonts: " << fontVramUsageMb << "mb)"; mFrameDataText = std::unique_ptr(mDefaultFonts.at(1)->buildTextCache(ss.str(), 50.f, 50.f, 0xFF00FFFF)); } diff --git a/src/guis/GuiScraperMulti.cpp b/src/guis/GuiScraperMulti.cpp index a5b1a879f..56bb0232b 100644 --- a/src/guis/GuiScraperMulti.cpp +++ b/src/guis/GuiScraperMulti.cpp @@ -2,6 +2,7 @@ #include "../Renderer.h" #include "../Log.h" #include "../views/ViewController.h" +#include "../XMLReader.h" #include "../components/TextComponent.h" #include "../components/ButtonComponent.h" @@ -111,6 +112,7 @@ void GuiScraperMulti::acceptResult(const ScraperSearchResult& result) ScraperSearchParams& search = mSearchQueue.front(); search.game->metadata = result.mdl; + updateGamelist(search.system); mSearchQueue.pop(); mCurrentGame++;