Make device.c assume CONFIG_BIOS is first in the config struct and make sure any device_t struct containing such follows that, in order to not have to traverse the entirety of every single device_t's config struct in the Settings dialog - should reduce the dialog's loading times further.
This commit is contained in:
@@ -1106,6 +1106,36 @@ xta_close(void *priv)
|
||||
|
||||
static const device_config_t wdxt150_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios_rev",
|
||||
.description = "BIOS Revision",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "rev_1",
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{
|
||||
.name = "Revision 1.0",
|
||||
.internal_name = "rev_1",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { WD_REV_1_BIOS_FILE, "" }
|
||||
},
|
||||
{
|
||||
.name = "Revision 2.0",
|
||||
.internal_name = "rev_2",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { WD_REV_2_BIOS_FILE, "" }
|
||||
},
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
@@ -1151,36 +1181,6 @@ static const device_config_t wdxt150_config[] = {
|
||||
},
|
||||
.bios = { { 0 } }
|
||||
},
|
||||
{
|
||||
.name = "bios_rev",
|
||||
.description = "BIOS Revision",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "rev_1",
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{
|
||||
.name = "Revision 1.0",
|
||||
.internal_name = "rev_1",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { WD_REV_1_BIOS_FILE, "" }
|
||||
},
|
||||
{
|
||||
.name = "Revision 2.0",
|
||||
.internal_name = "rev_2",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { WD_REV_2_BIOS_FILE, "" }
|
||||
},
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format off
|
||||
};
|
||||
|
||||
@@ -252,6 +252,37 @@ xtide_at_close(void *priv)
|
||||
|
||||
// clang-format off
|
||||
static const device_config_t xtide_config[] = {
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Revision",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "xt",
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.selection = { { 0 } },
|
||||
.bios = {
|
||||
{
|
||||
.name = "Regular XT",
|
||||
.internal_name = "xt",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { ROM_PATH_XT, "" }
|
||||
},
|
||||
{
|
||||
.name = "XT+ (V20/V30/8018x)",
|
||||
.internal_name = "xt_plus",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { ROM_PATH_XTP, "" }
|
||||
},
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "base",
|
||||
.description = "Address",
|
||||
@@ -348,37 +379,6 @@ static const device_config_t xtide_config[] = {
|
||||
},
|
||||
.bios = { { 0 } }
|
||||
},
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Revision",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "xt",
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.selection = { { 0 } },
|
||||
.bios = {
|
||||
{
|
||||
.name = "Regular XT",
|
||||
.internal_name = "xt",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { ROM_PATH_XT, "" }
|
||||
},
|
||||
{
|
||||
.name = "XT+ (V20/V30/8018x)",
|
||||
.internal_name = "xt_plus",
|
||||
.bios_type = BIOS_NORMAL,
|
||||
.files_no = 1,
|
||||
.local = 0,
|
||||
.size = 8192,
|
||||
.files = { ROM_PATH_XTP, "" }
|
||||
},
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user