mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
Auto PIN entry (#272)
## Link to GitHub Issue, if one exists Fixes https://github.com/spice2x/spice2x.github.io/issues/193 ## Description of change Merges guardianblue's changes plus some code review feedback. Adds the ability to automatically type out the digits of a PIN when an overlay shortcut is pressed. ## Compiling 💯 ## Testing Tested: * 32 bit popn * TDJ, 1p/2p * KFC, UFC
This commit is contained in:
@@ -737,6 +737,15 @@ int main_implementation(int argc, char *argv[]) {
|
||||
if (options[launcher::Options::Player2Card].is_active()) {
|
||||
CARD_OVERRIDES[1] = options[launcher::Options::Player2Card].value_text();
|
||||
}
|
||||
if (options[launcher::Options::Player1PinMacro].is_active()) {
|
||||
PIN_MACRO_ENABLED = true;
|
||||
PIN_MACRO_VALUES[0] = options[launcher::Options::Player1PinMacro].value_text();
|
||||
}
|
||||
if (options[launcher::Options::Player2PinMacro].is_active()) {
|
||||
PIN_MACRO_ENABLED = true;
|
||||
PIN_MACRO_VALUES[1] = options[launcher::Options::Player2PinMacro].value_text();
|
||||
}
|
||||
|
||||
for (auto &reader : options[launcher::Options::ICCAReaderPort].values_text()) {
|
||||
static int reader_id = 0;
|
||||
if (reader_id < 2) {
|
||||
@@ -1968,6 +1977,11 @@ int main_implementation(int argc, char *argv[]) {
|
||||
// start coin input thread
|
||||
eamuse_coin_start_thread();
|
||||
|
||||
// pin macro
|
||||
if (!cfg::CONFIGURATOR_STANDALONE && PIN_MACRO_ENABLED) {
|
||||
eamuse_pin_macro_start_thread();
|
||||
}
|
||||
|
||||
// print PEB
|
||||
if (peb_print) {
|
||||
peb::peb_print();
|
||||
@@ -2052,6 +2066,8 @@ int main_implementation(int argc, char *argv[]) {
|
||||
// stop coin input thread
|
||||
eamuse_coin_stop_thread();
|
||||
|
||||
eamuse_pin_macro_stop_thread();
|
||||
|
||||
// BT5API
|
||||
if (BT5API_ENABLED) {
|
||||
bt5api_dispose();
|
||||
|
||||
@@ -113,6 +113,26 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
|
||||
.category = "Network",
|
||||
.sensitive = true,
|
||||
},
|
||||
{
|
||||
// Player1PinMacro
|
||||
.title = "Player 1 PIN Macro",
|
||||
.name = "pinmacro0",
|
||||
.desc = "Set a PIN for Player 1 that will cause the PIN to be automatically typed when Player 1 PIN Macro overlay key is pressed",
|
||||
.type = OptionType::Text,
|
||||
.setting_name = "1234",
|
||||
.category = "Network (Advanced)",
|
||||
.sensitive = true,
|
||||
},
|
||||
{
|
||||
// Player2PinMacro
|
||||
.title = "Player 2 PIN Macro",
|
||||
.name = "pinmacro1",
|
||||
.desc = "Set a PIN for Player 2 that will cause the PIN to be automatically typed when Player 2 PIN Macro overlay key is pressed",
|
||||
.type = OptionType::Text,
|
||||
.setting_name = "5678",
|
||||
.category = "Network (Advanced)",
|
||||
.sensitive = true,
|
||||
},
|
||||
{
|
||||
.title = "Windowed Mode",
|
||||
.name = "w",
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace launcher {
|
||||
PCBID,
|
||||
Player1Card,
|
||||
Player2Card,
|
||||
Player1PinMacro,
|
||||
Player2PinMacro,
|
||||
WindowedMode,
|
||||
InjectHook,
|
||||
EarlyInjectHook,
|
||||
|
||||
Reference in New Issue
Block a user