mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
overlay: update UI for card manager (#294)
## Link to GitHub Issue, if one exists
n/a
## Description of change
Change the usage pattern for Card Manager UI.
### Previous behavior
Previously, it was a list of cards that you select, and click a button
to insert as P1 or P2.
This is fine, but users got confused when they pressed `Insert Card`
overlay key and got a different card inserted, or when auto-insert
didn't work as expected.
Additionally, if you play a game without continue (IIDX/DDR for
example), then it's cumbersome to bring up the overlay and click on
insert card every time.
### New behavior
Insert Card overlay now lets you pick a card and *slot* it into P1 or P2
side.
From that point on, the slotted card number is used as the override,
replacing what was previously passed to `-card0` or `-card1`. This means
that `Insert Card` button and auto-insert will pick up the new card and
use that instead.
## Compiling
👍
## Testing
Tested 1p-only game (popn) and 2p games (DDR, IIDX).
This commit is contained in:
@@ -124,6 +124,8 @@ std::string LOG_FILE_PATH = "";
|
||||
int LAUNCHER_ARGC = 0;
|
||||
char **LAUNCHER_ARGV = nullptr;
|
||||
std::unique_ptr<std::vector<Option>> LAUNCHER_OPTIONS;
|
||||
|
||||
std::mutex CARD_OVERRIDES_LOCK;
|
||||
std::string CARD_OVERRIDES[2];
|
||||
|
||||
// sub-systems
|
||||
@@ -744,9 +746,11 @@ int main_implementation(int argc, char *argv[]) {
|
||||
SetDllDirectoryW(MODULE_PATH.c_str());
|
||||
}
|
||||
if (options[launcher::Options::Player1Card].is_active()) {
|
||||
std::lock_guard<std::mutex> lock(CARD_OVERRIDES_LOCK);
|
||||
CARD_OVERRIDES[0] = options[launcher::Options::Player1Card].value_text();
|
||||
}
|
||||
if (options[launcher::Options::Player2Card].is_active()) {
|
||||
std::lock_guard<std::mutex> lock(CARD_OVERRIDES_LOCK);
|
||||
CARD_OVERRIDES[1] = options[launcher::Options::Player2Card].value_text();
|
||||
}
|
||||
if (options[launcher::Options::Player1PinMacro].is_active()) {
|
||||
|
||||
Reference in New Issue
Block a user