mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-14 11:26:09 +00:00
Various minor fixes
This commit is contained in:
@@ -294,6 +294,7 @@ void CVarManager::parseCommandLine(const std::vector<std::string>& args) {
|
||||
cv->fromLiteralToType(cvarValue);
|
||||
}
|
||||
cv->m_wasDeserialized = true;
|
||||
cv->forceClearModified();
|
||||
CStringExtras::ToLower(cvarName);
|
||||
if (developerName == cvarName)
|
||||
/* Make sure we're not overriding developer mode when we restore */
|
||||
@@ -301,7 +302,10 @@ void CVarManager::parseCommandLine(const std::vector<std::string>& args) {
|
||||
} else {
|
||||
/* Unable to find an existing CVar, let's defer for the time being 8 */
|
||||
CStringExtras::ToLower(cvarName);
|
||||
m_deferedCVars.insert_or_assign(std::move(cvarName), std::move(cvarValue));
|
||||
if (cvarValue.empty()) {
|
||||
cvarValue = "true";
|
||||
}
|
||||
m_deferedCVars.insert(std::make_pair<std::string, std::string>(std::move(cvarName), std::move(cvarValue)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "Runtime/ConsoleVariables/CVar.hpp"
|
||||
@@ -109,7 +110,7 @@ private:
|
||||
void restoreDeveloper(bool oldDeveloper);
|
||||
|
||||
std::unordered_map<std::string, std::unique_ptr<CVar>> m_cvars;
|
||||
std::unordered_map<std::string, std::string> m_deferedCVars;
|
||||
std::map<std::string, std::string> m_deferedCVars;
|
||||
std::vector<StoreCVar::CVar> loadCVars(const std::string& filename) const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user