summaryrefslogtreecommitdiff
path: root/src/sanitychecks.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-11-26 08:39:22 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-11-26 08:39:22 -0500
commitc3068ce50ab6e25e21452c2ea2f83086ddf555d5 (patch)
tree0e4f7c67852256a9847a8deccae8226d292b7969 /src/sanitychecks.cpp
parent2c2c47c21502db6471fe7d727f942c2400b150c1 (diff)
added rivatuner to sanity checks
now also checks modules loaded after startup fixed crash on w7 when checking some modules
Diffstat (limited to 'src/sanitychecks.cpp')
-rw-r--r--src/sanitychecks.cpp37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/sanitychecks.cpp b/src/sanitychecks.cpp
index 3b4185a7..495795f2 100644
--- a/src/sanitychecks.cpp
+++ b/src/sanitychecks.cpp
@@ -202,29 +202,36 @@ int checkMissingFiles()
return n;
}
-bool checkNahimic(const env::Environment& e)
+int checkIncompatibleModule(const env::Module& m)
{
- // Nahimic seems to interfere mostly with dialogs, like the mod info dialog:
- // it renders dialogs fully white and makes it impossible to interact with
- // them
+ // these dlls seems to interfere mostly with dialogs, like the mod info
+ // dialog: it renders dialogs fully white and makes it impossible to interact
+ // with them
//
- // NahimicOSD.dll is usually loaded on startup, but there has been some
- // reports where it got loaded later, so this check is not entirely accurate
+ // the dlls is usually loaded on startup, but there has been some reports
+ // where it got loaded later, so this is also called every time a new module
+ // is loaded into this process
- for (auto&& m : e.loadedModules()) {
- const QFileInfo file(m.path());
+ static const std::map<QString, QString> names = {
+ {"NahimicOSD.dll", "Nahimic"},
+ {"RTSSHooks64.dll", "RivaTuner Statistics Server"}
+ };
+
+ const QFileInfo file(m.path());
+ int n = 0;
- if (file.fileName().compare("NahimicOSD.dll", Qt::CaseInsensitive) == 0) {
+ for (auto&& p : names) {
+ if (file.fileName().compare(p.first, Qt::CaseInsensitive) == 0) {
log::warn(
- "NahimicOSD.dll is loaded. Nahimic is known to cause issues with "
+ "{} is loaded. This program is known to cause issues with "
"Mod Organizer, such as freezing or blank windows. Consider "
- "uninstalling it.");
+ "uninstalling it. ({})", p.second, file.absoluteFilePath());
- return true;
+ ++n;
}
}
- return false;
+ return n;
}
int checkIncompatibilities(const env::Environment& e)
@@ -233,8 +240,8 @@ int checkIncompatibilities(const env::Environment& e)
int n = 0;
- if (checkNahimic(e)) {
- ++n;
+ for (auto&& m : e.loadedModules()) {
+ n += checkIncompatibleModule(m);
}
return n;