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

Function InitInputPorts

src/drivers/win/input.cpp:603–700  ·  view source on GitHub ↗

Initializes the emulator with the current input port configuration

Source from the content-addressed store, hash-verified

601
602//Initializes the emulator with the current input port configuration
603void InitInputPorts(bool fourscore)
604{
605 void *InputDPtr;
606
607 int attrib;
608
609 if(fourscore)
610 {
611 FCEUI_SetInput(0,SI_GAMEPAD,&JSreturn,0);
612 FCEUI_SetInput(1,SI_GAMEPAD,&JSreturn,0);
613 } else
614 {
615 for(int i=0;i<2;i++)
616 {
617 attrib=0;
618 InputDPtr=0;
619 switch(InputType[i])
620 {
621 case SI_POWERPADA:
622 case SI_POWERPADB:
623 InputDPtr=&powerpadbuf[i];
624 break;
625 case SI_GAMEPAD:
626 InputDPtr=&JSreturn;
627 break;
628 case SI_ARKANOID:
629 InputDPtr=MouseData;
630 break;
631 case SI_ZAPPER:
632 InputDPtr=LuaMouseData;
633 break;
634 case SI_MOUSE:
635 InputDPtr=MouseRelative;
636 break;
637 case SI_SNES_MOUSE:
638 InputDPtr=MouseRelative;
639 break;
640 case SI_SNES:
641 InputDPtr=snespad_return;
642 break;
643 case SI_VIRTUALBOY:
644 InputDPtr=&virtualboybuf[i];
645 break;
646 case SI_LCDCOMP_ZAPPER:
647 InputDPtr = &lcdcompzapperbuf[i];
648 break;
649 }
650 FCEUI_SetInput(i,(ESI)InputType[i],InputDPtr,attrib);
651 }
652 }
653 FCEUI_SetInputFourscore(fourscore);
654
655 attrib=0;
656 InputDPtr=0;
657 switch(InputType[2])
658 {
659 case SIFC_SHADOW:
660 InputDPtr=MouseData;

Callers 3

ParseGIInputFunction · 0.85
FCEUD_SetInputFunction · 0.85
ConfigInputFunction · 0.85

Calls 3

FCEUI_SetInputFunction · 0.85
FCEUI_SetInputFourscoreFunction · 0.85
FCEUI_SetInputFCFunction · 0.85

Tested by

no test coverage detected