From 6a12495e596849950de77f9928251f9a2fd102fb Mon Sep 17 00:00:00 2001 From: VoltZ <47382115+SuperSaiyajinVoltZ@users.noreply.github.com> Date: Wed, 13 Nov 2019 23:02:54 +0100 Subject: [PATCH] Fixes from mister Whoopsie. --- source/screens/tinyDB.cpp | 14 ++++++-------- source/utils/config.cpp | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/source/screens/tinyDB.cpp b/source/screens/tinyDB.cpp index e3eefb7..6598fc3 100644 --- a/source/screens/tinyDB.cpp +++ b/source/screens/tinyDB.cpp @@ -98,14 +98,12 @@ void TinyDB::Draw(void) const { Gui::Draw_Rect(0, 30, 400, 180, C2D_Color32(140, 140, 140, 255)); Gui::Draw_Rect(0, 210, 400, 30, C2D_Color32(63, 81, 181, 255)); - if (selection != 0) { - Gui::DrawStringCentered(0, 35, 0.6f, Config::TxtColor, Lang::get("AUTHOR") + std::string(tinyDBJson[selectedOption]["info"]["author"]), 400); - Gui::DrawStringCentered(0, 65, 0.6f, Config::TxtColor, Lang::get("DESC") + std::string(tinyDBJson[selectedOption]["info"]["description"]), 400); - Gui::DrawStringCentered(0, 95, 0.6f, Config::TxtColor, Lang::get("RELEASE_TAG") + std::string(tinyDBJson[selectedOption]["info"]["releaseTag"]), 400); - Gui::DrawStringCentered(0, 125, 0.6f, Config::TxtColor, Lang::get("RELEASE_ID") + std::string(tinyDBJson[selectedOption]["info"]["releaseId"]), 400); - Gui::DrawStringCentered(0, 155, 0.6f, Config::TxtColor, Lang::get("TITLE_ID") + std::string(tinyDBJson[selectedOption]["info"]["titleid"]), 400); - Gui::DrawStringCentered(0, 185, 0.6f, Config::TxtColor, Lang::get("FILE_SIZE") + parseBytes(int64_t(tinyDBJson[selectedOption]["info"]["fileSize"])), 400); - } + Gui::DrawStringCentered(0, 35, 0.6f, Config::TxtColor, Lang::get("AUTHOR") + std::string(tinyDBJson[selectedOption]["info"]["author"]), 400); + Gui::DrawStringCentered(0, 65, 0.6f, Config::TxtColor, Lang::get("DESC") + std::string(tinyDBJson[selectedOption]["info"]["description"]), 400); + Gui::DrawStringCentered(0, 95, 0.6f, Config::TxtColor, Lang::get("RELEASE_TAG") + std::string(tinyDBJson[selectedOption]["info"]["releaseTag"]), 400); + Gui::DrawStringCentered(0, 125, 0.6f, Config::TxtColor, Lang::get("RELEASE_ID") + std::string(tinyDBJson[selectedOption]["info"]["releaseId"]), 400); + Gui::DrawStringCentered(0, 155, 0.6f, Config::TxtColor, Lang::get("TITLE_ID") + std::string(tinyDBJson[selectedOption]["info"]["titleid"]), 400); + Gui::DrawStringCentered(0, 185, 0.6f, Config::TxtColor, Lang::get("FILE_SIZE") + parseBytes(int64_t(tinyDBJson[selectedOption]["info"]["fileSize"])), 400); Gui::DrawStringCentered(0, 2, 0.7f, Config::TxtColor, "TinyDB", 400); std::string entryAmount = std::to_string(selection+1) + " / " + std::to_string(tinyDBList.size()); Gui::DrawString(397-Gui::GetStringWidth(0.6f, entryAmount), 237-Gui::GetStringHeight(0.6f, entryAmount), 0.6f, Config::TxtColor, entryAmount); diff --git a/source/utils/config.cpp b/source/utils/config.cpp index 6444ec9..73b955a 100644 --- a/source/utils/config.cpp +++ b/source/utils/config.cpp @@ -75,8 +75,8 @@ void Config::save() { Config::setInt("TEXTCOLOR", Config::TxtColor); Config::setInt("SELECTEDCOLOR", Config::SelectedColor); Config::setInt("UNSELECTEDCOLOR", Config::UnselectedColor); - Config::setString("SCRIPTPATH", SCRIPTS_PATH); - Config::setInt("LANGUAGE", 2); + Config::setString("SCRIPTPATH", Config::ScriptPath); + Config::setInt("LANGUAGE", Config::lang); FILE* file = fopen("sdmc:/3ds/Universal-Updater/Settings.json", "w"); if(file) fwrite(configJson.dump(1, '\t').c_str(), 1, configJson.dump(1, '\t').size(), file); fclose(file);