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

Function SetInputStuff

src/input.cpp:493–543  ·  view source on GitHub ↗

binds JPorts[pad] to the driver specified in JPType[pad]

Source from the content-addressed store, hash-verified

491#include <iostream>
492//binds JPorts[pad] to the driver specified in JPType[pad]
493static void SetInputStuff(int port)
494{
495 switch(joyports[port].type)
496 {
497 case SI_GAMEPAD:
498 if (GameInfo)
499 {
500 if (GameInfo->type==GIT_VSUNI){
501 joyports[port].driver = &GPCVS;
502 } else {
503 joyports[port].driver= &GPC;
504 }
505 }
506 else
507 {
508 joyports[port].driver= &GPC;
509 }
510 break;
511 case SI_SNES:
512 joyports[port].driver= &GPSNES;
513 break;
514 case SI_ARKANOID:
515 joyports[port].driver=FCEU_InitArkanoid(port);
516 break;
517 case SI_ZAPPER:
518 joyports[port].driver=FCEU_InitZapper(port);
519 break;
520 case SI_POWERPADA:
521 joyports[port].driver=FCEU_InitPowerpadA(port);
522 break;
523 case SI_POWERPADB:
524 joyports[port].driver=FCEU_InitPowerpadB(port);
525 break;
526 case SI_MOUSE:
527 joyports[port].driver=FCEU_InitMouse(port);
528 break;
529 case SI_SNES_MOUSE:
530 joyports[port].driver=FCEU_InitSNESMouse(port);
531 break;
532 case SI_VIRTUALBOY:
533 joyports[port].driver=FCEU_InitVirtualBoy(port);
534 break;
535 case SI_LCDCOMP_ZAPPER:
536 joyports[port].driver = FCEU_InitLCDCompZapper(port);
537 break;
538 case SI_NONE:
539 case SI_UNSET:
540 joyports[port].driver=&DummyJPort;
541 break;
542 }
543}
544
545static void SetInputStuffFC()
546{

Callers 2

FCEUI_SetInputFunction · 0.85
InitializeInputFunction · 0.85

Calls 8

FCEU_InitArkanoidFunction · 0.85
FCEU_InitZapperFunction · 0.85
FCEU_InitPowerpadAFunction · 0.85
FCEU_InitPowerpadBFunction · 0.85
FCEU_InitMouseFunction · 0.85
FCEU_InitSNESMouseFunction · 0.85
FCEU_InitVirtualBoyFunction · 0.85
FCEU_InitLCDCompZapperFunction · 0.85

Tested by

no test coverage detected