mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-13 11:28:56 +02:00
I'm tired of dealing with this tbh Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3706 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
26 lines
747 B
C++
26 lines
747 B
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#include "common/fs/fs.h"
|
|
#include "common/fs/path_util.h"
|
|
#include "gui_settings.h"
|
|
|
|
namespace FS = Common::FS;
|
|
|
|
namespace GraphicsBackend {
|
|
|
|
QString GuiConfigPath() {
|
|
return QString::fromStdString(
|
|
FS::PathToUTF8String(FS::GetEdenPath(FS::EdenPath::ConfigDir) / "gui_config.ini"));
|
|
}
|
|
|
|
void SetForceX11(bool state) {
|
|
(void)FS::CreateParentDir(GuiConfigPath().toStdString());
|
|
QSettings(GuiConfigPath(), QSettings::IniFormat).setValue("gui_force_x11", state);
|
|
}
|
|
|
|
bool GetForceX11() {
|
|
return QSettings(GuiConfigPath(), QSettings::IniFormat).value("gui_force_x11", false).toBool();
|
|
}
|
|
|
|
} // namespace GraphicsBackend
|