overlay: helper modal dialog for picking option values (#561)

## Link to GitHub Issue or related Pull Request, if one exists

## Description of change
Introduce a new modal dialog for picking out some of the options to
improve UX.

Implemented a few for now:

1. UI for picking ASIO drivers from a list (for -iidxasio, -sdvxasio,
-asioconvert, etc)
2. Button to generate card numbers for -card0 and card1
3. Processor Affinity selector (very similar to what's in Windows Task
Manager, list of checkboxes)
4. file selector (file open dialog for various file path overrides like
log file)
5. folder selector (folder override)

I wrote a selector for COM ports as well but how we use the value was
inconsistent (\\\\.\\COMx vs. COMx) and didn't see a huge point in it so
I didn't check it in.

## Testing
This commit is contained in:
bicarus
2026-03-02 12:08:20 -08:00
committed by GitHub
parent 2d623e179b
commit dc6850e479
8 changed files with 374 additions and 10 deletions
+26
View File
@@ -71,6 +71,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.type = OptionType::Text,
.setting_name = "*.dll",
.category = "Path Overrides",
// intentionally not setting a file picker here to discourage people setting this without a good reason
},
{
.title = "Open Configurator",
@@ -121,6 +122,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.setting_name = "E004010000000000",
.category = "Network",
.sensitive = true,
.picker = OptionPickerType::EACard,
},
{
.title = "Player 2 Card",
@@ -130,6 +132,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.setting_name = "E004010000000000",
.category = "Network",
.sensitive = true,
.picker = OptionPickerType::EACard,
},
{
// Player1PinMacro
@@ -618,6 +621,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.type = OptionType::Text,
.game_name = "Beatmania IIDX",
.category = "Game Options",
.picker = OptionPickerType::AsioDriver,
},
{
.title = "IIDX BIO2 Firmware Update",
@@ -778,6 +782,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.type = OptionType::Text,
.game_name = "Sound Voltex",
.category = "Game Options (Advanced)",
.picker = OptionPickerType::DirectoryPath,
},
{
.title = "SDVX Printer Output Clear",
@@ -889,6 +894,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.type = OptionType::Text,
.game_name = "Sound Voltex",
.category = "Game Options",
.picker = OptionPickerType::AsioDriver,
},
{
// spice2x_SDVXSubPos
@@ -1284,6 +1290,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Sets a custom path to the modules folder.",
.type = OptionType::Text,
.category = "Path Overrides",
// intentionally not setting a folder picker here to discourage people setting this without a good reason
},
{
.title = "Screenshot Folder Override",
@@ -1291,6 +1298,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Sets a custom path to the screenshots folder.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::DirectoryPath,
},
{
.title = "Configuration Path Override",
@@ -1310,6 +1318,8 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
"If left empty, %appdata%\\spice2x\\spicetools_screen_resize.json will be used.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::FilePath,
.file_extension = "JSON",
},
{
// PatchManagerConfigPath
@@ -1319,6 +1329,8 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
"If left empty, %appdata%\\spice2x\\spicetools_patch_manager.json will be used.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::FilePath,
.file_extension = "JSON",
},
{
.title = "Intel SDE",
@@ -1326,6 +1338,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Path to Intel SDE kit path for automatic attaching.",
.type = OptionType::Text,
.category = "Development",
.picker = OptionPickerType::DirectoryPath
},
{
.title = "ea3-config.xml Override",
@@ -1333,6 +1346,8 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Sets a custom path to ea3-config.xml.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::FilePath,
.file_extension = "XML",
},
{
.title = "app-config.xml Override",
@@ -1340,6 +1355,8 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Sets a custom path to app-config.xml.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::FilePath,
.file_extension = "XML",
},
{
.title = "avs-config.xml Override",
@@ -1347,6 +1364,8 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Sets a custom path to avs-config.xml.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::FilePath,
.file_extension = "XML",
},
{
.title = "bootstrap.xml Override",
@@ -1354,6 +1373,8 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Sets a custom path to bootstrap.xml.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::FilePath,
.file_extension = "XML",
},
{
.title = "log.txt Override",
@@ -1361,6 +1382,8 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.desc = "Sets a custom path to log.txt.",
.type = OptionType::Text,
.category = "Path Overrides",
.picker = OptionPickerType::FilePath,
.file_extension = "TXT",
},
{
.title = "API TCP Port",
@@ -1670,6 +1693,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
"Must provide a hexadecimal mask (e.g., 0x1ff00).",
.type = OptionType::Hex,
.category = "Performance",
.picker = OptionPickerType::CpuAffinity,
},
{
// spice2x_ProcessorEfficiencyClass
@@ -1774,6 +1798,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
"Does nothing for games that do not output to exclusive WASAPI.",
.type = OptionType::Text,
.category = "Audio",
.picker = OptionPickerType::AsioDriver,
},
{
.title = "WASAPI Dummy Context",
@@ -2607,6 +2632,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.type = OptionType::Text,
.game_name = "LovePlus",
.category = "Game Options (Advanced)",
.picker = OptionPickerType::DirectoryPath,
},
{
.title = "LovePlus Printer Output Clear",