mirror of https://github.com/xemu-project/xemu.git
ui: Add new settings option for token storage
This commit is contained in:
parent
89734ca828
commit
5a16f23a14
|
@ -59,6 +59,9 @@ struct xemu_settings {
|
|||
int net_backend;
|
||||
char *net_local_addr;
|
||||
char *net_remote_addr;
|
||||
|
||||
// [misc]
|
||||
char *user_token;
|
||||
};
|
||||
|
||||
struct enum_str_map {
|
||||
|
@ -112,6 +115,8 @@ struct config_offset_table {
|
|||
[XEMU_SETTINGS_NETWORK_BACKEND] = { CONFIG_TYPE_ENUM, "network", "backend", offsetof(struct xemu_settings, net_backend), { .default_int = XEMU_NET_BACKEND_USER }, net_backend_map },
|
||||
[XEMU_SETTINGS_NETWORK_LOCAL_ADDR] = { CONFIG_TYPE_STRING, "network", "local_addr", offsetof(struct xemu_settings, net_local_addr), { .default_str = "0.0.0.0:9368" } },
|
||||
[XEMU_SETTINGS_NETWORK_REMOTE_ADDR] = { CONFIG_TYPE_STRING, "network", "remote_addr", offsetof(struct xemu_settings, net_remote_addr), { .default_str = "1.2.3.4:9368" } },
|
||||
|
||||
[XEMU_SETTINGS_MISC_USER_TOKEN] = { CONFIG_TYPE_STRING, "misc", "user_token", offsetof(struct xemu_settings, user_token), { .default_str = "" } },
|
||||
};
|
||||
|
||||
static const char *settings_path;
|
||||
|
|
|
@ -46,6 +46,7 @@ enum xemu_settings_keys {
|
|||
XEMU_SETTINGS_NETWORK_BACKEND,
|
||||
XEMU_SETTINGS_NETWORK_LOCAL_ADDR,
|
||||
XEMU_SETTINGS_NETWORK_REMOTE_ADDR,
|
||||
XEMU_SETTINGS_MISC_USER_TOKEN,
|
||||
XEMU_SETTINGS__COUNT,
|
||||
XEMU_SETTINGS_INVALID = -1
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue