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

Function UpdateComboPad

src/drivers/win/input.cpp:1412–1438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410const unsigned int FAMICOM_POSITION = 2;
1411
1412static void UpdateComboPad(HWND hwndDlg, WORD id)
1413{
1414 unsigned int sel_input = id - COMBO_PAD1;
1415
1416 // Update the user input type
1417 InputType[sel_input] =
1418 SendDlgItemMessage(
1419 hwndDlg,
1420 id,
1421 CB_GETCURSEL,
1422 0,
1423 (LPARAM)(LPSTR)0
1424 );
1425
1426 // Enable or disable the configuration button
1427 EnableWindow(
1428 GetDlgItem(hwndDlg, id + 2),
1429 configurable_nes[InputType[sel_input]]
1430 );
1431
1432 // Update the text field
1433 SetDlgItemText(
1434 hwndDlg,
1435 TXT_PAD1 + sel_input,
1436 (LPTSTR)ESI_Name((ESI)InputType[sel_input])
1437 );
1438}
1439
1440static void UpdateComboFam(HWND hwndDlg)
1441{

Callers 2

UpdateFourscoreStateFunction · 0.85
InputConCallBFunction · 0.85

Calls 1

ESI_NameFunction · 0.85

Tested by

no test coverage detected