Skip to content

UI crashes if setting returns tdp key, but state doesn't. #17

@acuteaura

Description

@acuteaura

When setting up HHD with adjustor on a desktop (from the NixOS PR; for testing), the settings returns the tdp key and state does not. The UI crashes trying to read tdp off the state:

TypeError: Cannot read properties of undefined (reading 'general')

state:

{
  "gamemode": {
    "power": {
      "status": null,
      "hibernate": false,
      "hibernate_auto": true
    },
    "display": {
      "touchscreen_disable": false,
      "gestures_disable": null
    }
  },
  "shortcuts": {
    "controller": {
      "xbox_b": "disabled",
      "xbox_y": "disabled"
    },
    "touchscreen": {
      "bottom": "keyboard",
      "right_top": "hhd_qam",
      "right_bottom": "steam_qam",
      "left_top": "hhd_expanded",
      "left_bottom": "steam_expanded",
      "top": "disabled",
      "orientation": {
        "mode": "auto",
        "manual": {
          "dmi": "\"ASUS\" - \"System Product Name\"",
          "portrait": false,
          "flip_x": false,
          "flip_y": false
        }
      }
    },
    "keyboard": {
      "meta_press": "disabled",
      "meta_hold": "disabled",
      "ctrl_3": "hhd_expanded",
      "ctrl_4": "hhd_qam"
    }
  },
  "hhd": {
    "settings": {
      "language": "system",
      "theme": "default",
      "reset": false,
      "decky_deprecation": " ",
      "version": "3.15.10",
      "version_ui": "3.3.6",
      "version_adj": "3.10.5",
      "update_error": null,
      "powerbuttond": true
    },
    "http": {
      "enable": true,
      "port": 5335,
      "localhost": true,
      "token": true
    }
  },
  "version": "f9279514-en_US.UTF-8",
  "info": {
    "ac": null,
    "os": "ukn"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions