diff options
| author | Tannin <sherb@gmx.net> | 2015-12-07 21:00:22 +0100 |
|---|---|---|
| committer | Tannin <sherb@gmx.net> | 2015-12-07 21:00:22 +0100 |
| commit | e60e2858d8b6c40150ae0dee2ba267fecfa17979 (patch) | |
| tree | 98f9645b57264524a00015d92cb1987b0802e238 /src/loadmechanism.cpp | |
| parent | 495846534d560f825819b7ee391e8c461ce76e4f (diff) | |
| parent | 752bed064c24593e04ad121c29d40a20bbfc679a (diff) | |
Merge branch 'master' into new_vfs_library
Conflicts:
src/gameinfoimpl.cpp
src/installationmanager.cpp
src/mainwindow.cpp
src/organizercore.cpp
src/organizercore.h
src/organizerproxy.cpp
src/organizerproxy.h
src/savegamegamebryo.cpp
src/savegamegamebyro.h
src/selfupdater.h
src/shared/fallout3info.cpp
src/shared/fallout3info.h
src/shared/falloutnvinfo.cpp
src/shared/falloutnvinfo.h
src/shared/gameinfo.cpp
src/shared/gameinfo.h
src/shared/oblivioninfo.cpp
src/shared/oblivioninfo.h
src/shared/skyriminfo.cpp
src/shared/skyriminfo.h
src/spawn.cpp
src/transfersavesdialog.cpp
Diffstat (limited to 'src/loadmechanism.cpp')
| -rw-r--r-- | src/loadmechanism.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index 4f9f8b1b..8ca8464e 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -56,7 +56,7 @@ void LoadMechanism::writeHintFile(const QDir &targetDirectory) }
-void LoadMechanism::removeHintFile(QDir &targetDirectory)
+void LoadMechanism::removeHintFile(QDir targetDirectory)
{
targetDirectory.remove("mo_path.txt");
}
@@ -64,7 +64,8 @@ void LoadMechanism::removeHintFile(QDir &targetDirectory) bool LoadMechanism::isDirectLoadingSupported()
{
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ //FIXME: Seriously? isn't there a 'do i need steam' thing?
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
if (game->gameName().compare("oblivion", Qt::CaseInsensitive) == 0) {
// oblivion can be loaded directly if it's not the steam variant
return !game->gameDirectory().exists("steam_api.dll");
@@ -76,13 +77,11 @@ bool LoadMechanism::isDirectLoadingSupported() bool LoadMechanism::isScriptExtenderSupported()
{
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
ScriptExtender *extender = game->feature<ScriptExtender>();
// test if there even is an extender for the managed game and if so whether it's installed
- return (extender != nullptr)
- && (game->gameDirectory().exists(extender->name() + "_loader.exe")
- || game->gameDirectory().exists(extender->name() + "_steam_loader.dll"));
+ return extender != nullptr && extender->isInstalled();
}
bool LoadMechanism::isProxyDLLSupported()
@@ -92,7 +91,7 @@ bool LoadMechanism::isProxyDLLSupported() // plus: the proxy dll hasn't been working for at least the whole 1.12.x versions of MO and
// noone reported it so why maintain an unused feature?
return false;
-/* IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+/* IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
return game->gameDirectory().exists(QString::fromStdWString(AppConfig::proxyDLLTarget()));*/
}
@@ -124,7 +123,7 @@ bool LoadMechanism::hashIdentical(const QString &fileNameLHS, const QString &fil void LoadMechanism::deactivateScriptExtender()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
ScriptExtender *extender = game->feature<ScriptExtender>();
if (extender == nullptr) {
throw MyException(QObject::tr("game doesn't support a script extender"));
@@ -154,7 +153,7 @@ void LoadMechanism::deactivateScriptExtender() void LoadMechanism::deactivateProxyDLL()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
QString targetPath = game->gameDirectory().absoluteFilePath(QString::fromStdWString(AppConfig::proxyDLLTarget()));
@@ -183,7 +182,7 @@ void LoadMechanism::deactivateProxyDLL() void LoadMechanism::activateScriptExtender()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
ScriptExtender *extender = game->feature<ScriptExtender>();
if (extender == nullptr) {
throw MyException(QObject::tr("game doesn't support a script extender"));
@@ -226,7 +225,7 @@ void LoadMechanism::activateScriptExtender() void LoadMechanism::activateProxyDLL()
{
try {
- IPluginGame *game = qApp->property("managed_game").value<IPluginGame*>();
+ IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
QString targetPath = game->gameDirectory().absoluteFilePath(QString::fromStdWString(AppConfig::proxyDLLTarget()));
|
