eden-miror/src/qt_common/gui_settings.cpp
crueter 8678cb06eb
Some checks failed
tx-src / sources (push) Has been cancelled
Check Strings / check-strings (push) Has been cancelled
[meta] clang-format literally all of the Qt code (#3706)
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>
2026-03-10 06:51:08 +01:00

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