fixed a small config bug for boolean options

This commit is contained in:
EricPlayZ
2024-01-26 22:31:54 +02:00
parent 432a65e977
commit cc244db9fd
2 changed files with 11 additions and 11 deletions
@@ -1,11 +1,11 @@
#include <filesystem>
#include <any>
#include <array>
#include <filesystem>
#include <functional>
#include "config.h"
#include "..\menu\menu.h"
#include "..\utils.h"
#include "..\print.h"
#include "..\utils.h"
#include "config.h"
#include "ini.h"
namespace Config {
@@ -4132,7 +4132,7 @@ namespace Config {
for (auto& entry : configVariablesDefault) {
switch (entry.type) {
case OPTION:
reinterpret_cast<Option*>(entry.optionPtr)->Change(reader.Get(entry.section.data(), entry.key.data(), std::any_cast<bool>(entry.value)));
reinterpret_cast<Option*>(entry.optionPtr)->Set(reader.Get(entry.section.data(), entry.key.data(), std::any_cast<bool>(entry.value)));
break;
case Float:
*reinterpret_cast<float*>(entry.optionPtr) = reader.Get(entry.section.data(), entry.key.data(), std::any_cast<float>(entry.value));
+7 -7
View File
@@ -1,12 +1,12 @@
#include <algorithm>
#include <sstream>
#include <fstream>
#include <filesystem>
#include <imgui.h>
#include <ImGuiFileDialog.h>
#include <Hotkey.h>
#include "..\game_classes.h"
#include <ImGuiFileDialog.h>
#include <algorithm>
#include <filesystem>
#include <fstream>
#include <imgui.h>
#include <sstream>
#include "..\core.h"
#include "..\game_classes.h"
#include "..\utils.h"
#include "camera.h"