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

Function InitInputInterface

src/drivers/Qt/input.cpp:1762–1849  ·  view source on GitHub ↗

* Initialize the input device interface between the emulation and the driver. */

Source from the content-addressed store, hash-verified

1760 * Initialize the input device interface between the emulation and the driver.
1761 */
1762void InitInputInterface()
1763{
1764 void *InputDPtr;
1765
1766 int t;
1767 int x;
1768 int attrib;
1769
1770 memset(g_keyState, 0, sizeof(g_keyState));
1771
1772 for (t = 0, x = 0; x < 2; x++)
1773 {
1774 attrib = 0;
1775 InputDPtr = 0;
1776
1777 switch (CurInputType[x])
1778 {
1779 case SI_POWERPADA:
1780 case SI_POWERPADB:
1781 InputDPtr = &powerpadbuf[x];
1782 break;
1783 case SI_GAMEPAD:
1784 case SI_SNES:
1785 InputDPtr = &JSreturn;
1786 break;
1787 case SI_ARKANOID:
1788 InputDPtr = MouseData;
1789 t |= 1;
1790 break;
1791 case SI_ZAPPER:
1792 InputDPtr = MouseData;
1793 t |= 1;
1794 attrib = 1;
1795 break;
1796 case SI_MOUSE:
1797 case SI_SNES_MOUSE:
1798 InputDPtr = MouseRelative;
1799 t |= 1;
1800 break;
1801 }
1802 FCEUI_SetInput(x, (ESI)CurInputType[x], InputDPtr, attrib);
1803 }
1804
1805 attrib = 0;
1806 InputDPtr = 0;
1807 switch (CurInputType[2])
1808 {
1809 case SIFC_SHADOW:
1810 InputDPtr = MouseData;
1811 t |= 1;
1812 attrib = 1;
1813 break;
1814 case SIFC_OEKAKIDS:
1815 InputDPtr = MouseData;
1816 t |= 1;
1817 attrib = 1;
1818 break;
1819 case SIFC_ARKANOID:

Callers 2

DriverInitializeFunction · 0.70
FCEUD_SetInputFunction · 0.70

Calls 3

FCEUI_SetInputFunction · 0.85
FCEUI_SetInputFCFunction · 0.85
FCEUI_SetInputFourscoreFunction · 0.85

Tested by

no test coverage detected