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
+10
View File
@@ -10,6 +10,7 @@
#include "device.h"
#include "hotplug.h"
#include "util/scope_guard.h"
namespace rawinput {
@@ -31,6 +32,15 @@ namespace rawinput {
extern bool NAIVE_REQUIRE_FOCUS;
extern bool RAWINPUT_REQUIRE_FOCUS;
// while active, prevents overlay from accepting any input
// can be used while OS modal dialog is shown on top of overlay/spicecfg
// always prefer RAII set_os_window_focus_guard instead of the global bool
extern bool OS_WINDOW_ACTIVE;
inline scope_guard set_os_window_focus_guard() {
rawinput::OS_WINDOW_ACTIVE = true;
return scope_guard {[]() { rawinput::OS_WINDOW_ACTIVE = false; }};
}
struct DeviceCallback {
void *data;
std::function<void(void*, Device*)> f;