1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00

Add DirectX version option

This commit is contained in:
redstrate 2021-11-02 08:49:06 -04:00
parent 5d3dfb6ca2
commit a1be2963ce
3 changed files with 19 additions and 1 deletions

View file

@ -9,6 +9,7 @@
#include <QGroupBox> #include <QGroupBox>
#include <QMessageBox> #include <QMessageBox>
#include <QProcess> #include <QProcess>
#include <QComboBox>
#include "xivlauncher.h" #include "xivlauncher.h"
@ -19,6 +20,17 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
auto layout = new QFormLayout(this); auto layout = new QFormLayout(this);
setLayout(layout); setLayout(layout);
auto directXCombo = new QComboBox();
directXCombo->setCurrentIndex(window.settings.value("directx", 0).toInt());
directXCombo->addItem("DirectX 11");
directXCombo->addItem("DirectX 9");
layout->addRow("DirectX Version", directXCombo);
connect(directXCombo, &QComboBox::currentIndexChanged, [=](int index) {
this->window.settings.setValue("directx", directXCombo->currentIndex());
this->window.useDX9 = directXCombo->currentIndex() == 1;
});
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
auto wineBox = new QGroupBox("Wine Options"); auto wineBox = new QGroupBox("Wine Options");
auto wineBoxLayout = new QFormLayout(); auto wineBoxLayout = new QFormLayout();

View file

@ -43,7 +43,12 @@ void LauncherWindow::launchGame(const LoginAuth auth) {
QList<QString> arguments; QList<QString> arguments;
// now for the actual game... // now for the actual game...
arguments.push_back(gamePath + "\\game\\ffxiv_dx11.exe"); if(useDX9) {
arguments.push_back(gamePath + "\\game\\ffxiv.exe");
} else {
arguments.push_back(gamePath + "\\game\\ffxiv_dx11.exe");
}
arguments.push_back("DEV.DataPathType=1"); arguments.push_back("DEV.DataPathType=1");
arguments.push_back("DEV.UseSqPack=1"); arguments.push_back("DEV.UseSqPack=1");

View file

@ -36,6 +36,7 @@ public:
QString bootVersion, gameVersion; QString bootVersion, gameVersion;
bool useEsync, useGamescope, useGamemode; bool useEsync, useGamescope, useGamemode;
bool useDX9 = false;
void launchGame(const LoginAuth auth); void launchGame(const LoginAuth auth);
void launchExecutable(const QStringList args); void launchExecutable(const QStringList args);