mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-02 05:54:30 +00:00
a CLI option to disable SteamDeck detection
This commit is contained in:
1 parent
d0a32732b6
commit
910f7ce79e
2 files changed
+22
-11
No files matched your search
+15
-11
@@ -1126,15 +1126,17 @@ EX void font_reaction() {
|
||||
}
|
||||
#endif
|
||||
|
||||
EX bool running_on_deck = false;
|
||||
EX bool detect_deck = true;
|
||||
|
||||
EX void initConfig() {
|
||||
|
||||
DEBBI(debug_init_config, ("initconfig"));
|
||||
|
||||
bool qm = !ISPANDORA;
|
||||
bool deck = false;
|
||||
|
||||
#if ISLINUX
|
||||
if(1) {
|
||||
if(detect_deck) {
|
||||
string name = "", vendor = "";
|
||||
if(1) {
|
||||
fhstream f("/sys/devices/virtual/dmi/id/board_name", "rt");
|
||||
@@ -1145,15 +1147,17 @@ EX void initConfig() {
|
||||
if(f.f) vendor = scanline_noblank(f);
|
||||
}
|
||||
if(vendor.find("Valve") != string::npos && (name.find("Jupiter") != string::npos || name.find("Galileo") != string::npos))
|
||||
deck = true;
|
||||
running_on_deck = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ISSTEAM
|
||||
if(is_steamdeck()) deck = true;
|
||||
if(detect_deck && is_steamdeck()) running_on_deck = true;
|
||||
#endif
|
||||
|
||||
if(deck) {
|
||||
detect_deck = false;
|
||||
|
||||
if(running_on_deck) {
|
||||
centered_menus = true;
|
||||
lands_per_page = 18;
|
||||
dialog::onscreen_keyboard = true;
|
||||
@@ -1449,9 +1453,9 @@ EX void initConfig() {
|
||||
->editable("vsync", 'v');
|
||||
#endif
|
||||
|
||||
param_b(vid.want_fullscreen, "fullscreen", deck ? true : false)
|
||||
param_b(vid.want_fullscreen, "fullscreen", running_on_deck ? true : false)
|
||||
->editable("fullscreen mode", 'f');
|
||||
param_b(vid.change_fullscr, "fullscreen_change", deck ? true : false)
|
||||
param_b(vid.change_fullscr, "fullscreen_change", running_on_deck ? true : false)
|
||||
->editable("use specific fullscreen resolution", 'g');
|
||||
param_b(vid.relative_window_size, "window_relative", true)
|
||||
->editable("specify relative window size", 'g');
|
||||
@@ -1466,7 +1470,7 @@ EX void initConfig() {
|
||||
dialog::bound_low(dialog::get_ne().vmin);
|
||||
dialog::get_di().reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_i(vid.fullscreen_y, "fullscreen_y", deck ? 800 : 1024)
|
||||
param_i(vid.fullscreen_y, "fullscreen_y", running_on_deck ? 800 : 1024)
|
||||
-> editable(480, 2160, 1, "fullscreen resolution to use (Y)", "", 'x')
|
||||
-> set_sets([] {
|
||||
dialog::scale_given(get_display_modes('y'));
|
||||
@@ -1477,15 +1481,15 @@ EX void initConfig() {
|
||||
-> editable(160, 3840, 40, "window resolution to use (X)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(160); dialog::get_di().reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_i(vid.window_y, "window_y", deck ? 800 : 1024)
|
||||
param_i(vid.window_y, "window_y", running_on_deck ? 800 : 1024)
|
||||
-> editable(120, 2160, 40, "window resolution to use (Y)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(120); dialog::get_di().reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_f(vid.window_rel_x, "window_rel_x", deck ? 1 : .9)
|
||||
param_f(vid.window_rel_x, "window_rel_x", running_on_deck ? 1 : .9)
|
||||
-> editable(.1, 1, .1, "screen size percentage to use (X)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(.1); dialog::get_di().reaction_final = do_request_resolution_change; });
|
||||
|
||||
param_f(vid.window_rel_y, "window_rel_y", deck ? 1 : .9)
|
||||
param_f(vid.window_rel_y, "window_rel_y", running_on_deck ? 1 : .9)
|
||||
-> editable(.1, 1, .1, "screen size percentage to use (Y)", "", 'x')
|
||||
-> set_sets([] { dialog::bound_low(.1); dialog::get_di().reaction_final = do_request_resolution_change; });
|
||||
|
||||
|
||||
Reference in new issue
Block a user