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

Function DoTBCallB

src/drivers/win/input.cpp:1347–1393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1345static int DoTBType=0,DoTBPort=0;
1346
1347static INT_PTR CALLBACK DoTBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
1348{
1349 switch(uMsg) {
1350 case WM_INITDIALOG:
1351 if(DoTBType == SI_GAMEPAD)
1352 {
1353 char buf[32];
1354 sprintf(buf,"Virtual Gamepad %d",DoTBPort+1);
1355 SetDlgItemText(hwndDlg, GRP_GAMEPAD1,buf);
1356
1357 sprintf(buf,"Virtual Gamepad %d",DoTBPort+3);
1358 SetDlgItemText(hwndDlg, GRP_GAMEPAD2, buf);
1359 }
1360 if(DoTBType == SI_SNES)
1361 {
1362 char buf[32];
1363 sprintf(buf,"Virtual SNES Pad %d",DoTBPort+1);
1364 SetDlgItemText(hwndDlg, GRP_GAMEPAD1,buf);
1365 }
1366 SetWindowText(hwndDlg, DoTBTitle);
1367 break;
1368 case WM_CLOSE:
1369 case WM_QUIT: goto gornk;
1370
1371 case WM_COMMAND:
1372 {
1373 int b;
1374 b=wParam&0xFFFF;
1375 if(b>= 300 && b < (300 + DoTBMax))
1376 {
1377 char btext[128];
1378 btext[0]=0;
1379 GetDlgItemText(hwndDlg, b, btext, 128);
1380 DWaitButton(hwndDlg, btext,&DoTBButtons[b - 300]); //mbg merge 7/17/06 added cast
1381 }
1382 else switch(wParam&0xFFFF)
1383 {
1384 case BTN_CLOSE:
1385gornk:
1386
1387 EndDialog(hwndDlg,0);
1388 break;
1389 }
1390 }
1391 }
1392 return 0;
1393}
1394
1395static void DoTBConfig(HWND hParent, const char *text, char *_template, ButtConfig *buttons, int max)
1396{

Callers

nothing calls this directly

Calls 2

GetDlgItemTextFunction · 0.85
DWaitButtonFunction · 0.70

Tested by

no test coverage detected