MCPcopy Create free account
hub / github.com/TASEmulators/fceux / UpdateFourscoreState

Function UpdateFourscoreState

src/drivers/win/input.cpp:1467–1492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1465
1466
1467static void UpdateFourscoreState(HWND dlg)
1468{
1469 //(inverse logic:)
1470 BOOL enable = (eoptions & EO_FOURSCORE)?FALSE:TRUE;
1471
1472 EnableWindow(GetDlgItem(dlg,BTN_PORT1),enable);
1473 EnableWindow(GetDlgItem(dlg,BTN_PORT2),enable);
1474 EnableWindow(GetDlgItem(dlg,COMBO_PAD1),enable);
1475 EnableWindow(GetDlgItem(dlg,COMBO_PAD2),enable);
1476 EnableWindow(GetDlgItem(dlg,TXT_PAD1),enable);
1477 EnableWindow(GetDlgItem(dlg,TXT_PAD2),enable);
1478
1479 //change the inputs to gamepad
1480 if(!enable)
1481 {
1482 SendMessage(GetDlgItem(dlg,COMBO_PAD1),CB_SETCURSEL,SI_GAMEPAD,0);
1483 SendMessage(GetDlgItem(dlg,COMBO_PAD2),CB_SETCURSEL,SI_GAMEPAD,0);
1484 UpdateComboPad(dlg,COMBO_PAD1);
1485 UpdateComboPad(dlg,COMBO_PAD2);
1486 SetDlgItemText(dlg,TXT_PAD1,ESI_Name(SI_GAMEPAD));
1487 SetDlgItemText(dlg,TXT_PAD2,ESI_Name(SI_GAMEPAD));
1488 }
1489
1490 EnableWindow(GetDlgItem(dlg,102), enable);
1491 EnableWindow(GetDlgItem(dlg,103), enable);
1492}
1493
1494//Callback function of the input configuration dialog.
1495INT_PTR CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)

Callers 1

InputConCallBFunction · 0.85

Calls 2

UpdateComboPadFunction · 0.85
ESI_NameFunction · 0.85

Tested by

no test coverage detected