mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-19 03:00:50 -04:00
fix(adjust): STEAM_DECK Variable
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -6215,13 +6215,23 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
||||||
|
|
||||||
const bool is_gamescope = qgetenv("XDG_CURRENT_DESKTOP") == "gamescope";
|
// Gamescope/Steam Deck detection
|
||||||
|
const bool is_gamescope = qgetenv("XDG_CURRENT_DESKTOP") == "gamescope" ||
|
||||||
|
!qgetenv("GAMESCOPE_WIDTH").isEmpty() ||
|
||||||
|
!qgetenv("STEAM_DECK").isEmpty();
|
||||||
|
|
||||||
if (is_gamescope) {
|
if (is_gamescope) {
|
||||||
|
// Force the environment to ignore the Deck's high-density screen
|
||||||
|
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "0");
|
||||||
qputenv("QT_ENABLE_HIGHDPI_SCALING", "0");
|
qputenv("QT_ENABLE_HIGHDPI_SCALING", "0");
|
||||||
qputenv("QT_SCALE_FACTOR", "1");
|
qputenv("QT_SCALE_FACTOR", "1");
|
||||||
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "0");
|
|
||||||
qputenv("QT_FONT_DPI", "96");
|
qputenv("QT_FONT_DPI", "96");
|
||||||
|
|
||||||
|
// Force Qt to use a 1:1 pixel ratio
|
||||||
|
// These MUST be set before the QApplication app(...) line
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_Use96Dpi);
|
||||||
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
|
QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
|
||||||
QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs);
|
QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs);
|
||||||
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "xdg-shell");
|
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "xdg-shell");
|
||||||
|
|||||||
Reference in New Issue
Block a user