From 6b916831b741e3b8dbc08568b9cd60ede092cdda Mon Sep 17 00:00:00 2001 From: CocoSimone Date: Sun, 19 Feb 2023 16:41:13 +0100 Subject: [PATCH] i removed the gamelist already so no need to set it in the settings --- src/frontend/imgui/Settings.cpp | 15 --------------- src/frontend/imgui/Settings.hpp | 3 +-- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/frontend/imgui/Settings.cpp b/src/frontend/imgui/Settings.cpp index 40eb1709..6b6bfaf4 100644 --- a/src/frontend/imgui/Settings.cpp +++ b/src/frontend/imgui/Settings.cpp @@ -47,10 +47,8 @@ Settings::Settings(n64::Core& core) { checkjsonentry(volumeR, float, "audio", "volumeR", 0.5); checkjsonentry(volumeL, float, "audio", "volumeL", 0.5); checkjsonentry(lockChannels, bool, "audio", "lockChannels", true); - checkjsonentry(gamesDir, std::string, "general", "gamesDir", ""); } else { settingsFile = std::fstream("resources/settings.json", std::fstream::trunc | std::fstream::in | std::fstream::out); - settings["general"]["gamesDir"] = ""; settings["cpu"]["type"] = "interpreter"; settings["audio"]["volumeR"] = 0.5; settings["audio"]["volumeL"] = 0.5; @@ -60,7 +58,6 @@ Settings::Settings(n64::Core& core) { volumeR = 0.5; volumeL = 0.5; lockChannels = true; - gamesDir = ""; settingsFile << settings; } @@ -84,7 +81,6 @@ Settings::~Settings() { if(fileExists) { settingsFile = std::fstream("resources/settings.json", std::fstream::trunc | std::fstream::out); - settings["general"]["gamesDir"] = gamesDir; settings["cpu"]["type"] = cpuType; settings["audio"]["volumeR"] = volumeR; settings["audio"]["volumeL"] = volumeL; @@ -93,7 +89,6 @@ Settings::~Settings() { } else { settingsFile = std::fstream("resources/settings.json", std::fstream::out); - settings["general"]["gamesDir"] = gamesDir; settings["cpu"]["type"] = cpuType; settings["audio"]["volumeR"] = volumeR; settings["audio"]["volumeL"] = volumeL; @@ -115,16 +110,6 @@ void Settings::RenderWidget(bool& show) { ImGui::Separator(); switch (category) { case General: - ImGui::Text("Games directory: %s", gamesDir.c_str()); - ImGui::SameLine(); - if(ImGui::Button("Select...")) { - nfdchar_t *outpath; - nfdresult_t result = NFD_PickFolder(&outpath, nullptr); - if (result == NFD_OKAY) { - gamesDir = outpath; - NFD_FreePath(outpath); - } - } break; case CPU: { const char *cpuTypes[] = {"JIT", "Interpreter"}; diff --git a/src/frontend/imgui/Settings.hpp b/src/frontend/imgui/Settings.hpp index 1139dd12..fd2df965 100644 --- a/src/frontend/imgui/Settings.hpp +++ b/src/frontend/imgui/Settings.hpp @@ -12,11 +12,10 @@ struct Settings { float GetVolumeR() const { return volumeR; }; bool GetLockChannels() const { return lockChannels; } std::string GetCpuType() const { return cpuType; } - std::string GetGamesDir() const { return gamesDir; } void RenderWidget(bool& show); private: - std::string cpuType = "interpreter", gamesDir = ""; + std::string cpuType = "interpreter"; float volumeL = 0.0, volumeR = 0.0; bool lockChannels = true; json settings;