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

Function UpdatePPadData

src/drivers/Qt/input.cpp:1586–1609  ·  view source on GitHub ↗

* Update the status of the power pad input device. */

Source from the content-addressed store, hash-verified

1584 * Update the status of the power pad input device.
1585 */
1586static uint32
1587UpdatePPadData(int w)
1588{
1589 // don't update if a movie is playing
1590 if (FCEUMOV_Mode(MOVIEMODE_PLAY))
1591 {
1592 return 0;
1593 }
1594
1595 uint32 r = 0;
1596 ButtConfig *ppadtsc = powerpadsc[w];
1597 int x;
1598
1599 // update each of the 12 buttons
1600 for (x = 0; x < 12; x++)
1601 {
1602 if (DTestButton(&ppadtsc[x]))
1603 {
1604 r |= 1 << x;
1605 }
1606 }
1607
1608 return r;
1609}
1610
1611static uint32 MouseData[3] = {0, 0, 0};
1612static int32 MouseRelative[3] = {0, 0, 0};

Callers 1

FCEUD_UpdateInputFunction · 0.70

Calls 2

FCEUMOV_ModeFunction · 0.85
DTestButtonFunction · 0.70

Tested by

no test coverage detected