mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-22 08:34:50 +00:00
Steam Deck detection, and setting the parameters automatically
This commit is contained in:
17
config.cpp
17
config.cpp
@@ -1086,6 +1086,23 @@ EX void initConfig() {
|
||||
|
||||
DEBBI(debug_init_config, ("initconfig"));
|
||||
|
||||
#if ISLINUX
|
||||
if(1) {
|
||||
fhstream f("/sys/devices/virtual/dmi/id/board_name", "rt");
|
||||
if(f.f) {
|
||||
string s = scanline_noblank(f);
|
||||
println(hlog, "got '", s, "'");
|
||||
bool deck = s.find("Jupiter") != string::npos;
|
||||
if(deck) {
|
||||
centered_menus = true;
|
||||
lands_per_page = 18;
|
||||
defaultjoy = false;
|
||||
dialog::onscreen_keyboard = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// basic config
|
||||
param_i(vid.flashtime, "flashtime", 8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user