summaryrefslogtreecommitdiff
path: root/src/shared/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/util.cpp')
-rw-r--r--src/shared/util.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/shared/util.cpp b/src/shared/util.cpp
index 8d8c2000..eacd1f88 100644
--- a/src/shared/util.cpp
+++ b/src/shared/util.cpp
@@ -23,6 +23,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "executableslist.h"
#include "instancemanager.h"
#include <utility.h>
+#include <log.h>
#include <sstream>
#include <locale>
@@ -41,8 +42,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#pragma comment(lib, "Wbemuuid.lib")
-using MOBase::formatSystemMessage;
-using MOBase::formatSystemMessageQ;
+using namespace MOBase;
namespace fs = std::filesystem;
namespace MOShared {
@@ -870,7 +870,7 @@ Environment::Environment()
m_security = getSecurityProducts();
}
-const std::vector<Module>& Environment::loadedModules()
+const std::vector<Module>& Environment::loadedModules() const
{
return m_modules;
}
@@ -885,6 +885,25 @@ const std::vector<SecurityProduct>& Environment::securityProducts() const
return m_security;
}
+void Environment::dump() const
+{
+ log::debug("windows: {}", windowsInfo().toString());
+
+ if (windowsInfo().compatibilityMode()) {
+ log::warn("MO seems to be running in compatibility mode");
+ }
+
+ log::debug("security products:");
+ for (const auto& sp : securityProducts()) {
+ log::debug(" . {}", sp.toString());
+ }
+
+ log::debug("modules loaded in process:");
+ for (const auto& m : loadedModules()) {
+ log::debug(" . {}", m.toString());
+ }
+}
+
std::vector<Module> Environment::getLoadedModules() const
{
HandlePtr snapshot(CreateToolhelp32Snapshot(