mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 19:06:58 +03:00
GH-977 possibly fix FTB on windows. Maybe. Partially.
This commit is contained in:
parent
29ce36c7bc
commit
81b37dae18
1 changed files with 10 additions and 2 deletions
|
|
@ -282,8 +282,16 @@ void FTBPlugin::initialize(SettingsObjectPtr globalSettings)
|
|||
QString ftbDefault, newFtbDefault, oldFtbDefault;
|
||||
if (!GetEnvironmentVariableW(L"LOCALAPPDATA", newBuf, APPDATA_BUFFER_SIZE))
|
||||
{
|
||||
qCritical() << "Your LOCALAPPDATA folder is missing! If you are on windows, this means "
|
||||
"your system is broken.";
|
||||
if(!GetEnvironmentVariableW(L"USERPROFILE", newBuf, APPDATA_BUFFER_SIZE))
|
||||
{
|
||||
qCritical() << "Your LOCALAPPDATA folder is missing! If you are on windows, this means your system is broken.";
|
||||
}
|
||||
else
|
||||
{
|
||||
auto userHome = QString::fromWCharArray(newBuf);
|
||||
auto localAppData = PathCombine(QString::fromWCharArray(newBuf), "Local Settings", "Application Data");
|
||||
newFtbDefault = QDir(localAppData).absoluteFilePath("ftblauncher");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue