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

Function UpdatePPadData

src/drivers/sdl/input.cpp:1179–1202  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1177 * Update the status of the power pad input device.
1178 */
1179static uint32
1180UpdatePPadData (int w)
1181{
1182 // don't update if a movie is playing
1183 if (FCEUMOV_Mode (MOVIEMODE_PLAY))
1184 {
1185 return 0;
1186 }
1187
1188 uint32 r = 0;
1189 ButtConfig *ppadtsc = powerpadsc[w];
1190 int x;
1191
1192 // update each of the 12 buttons
1193 for (x = 0; x < 12; x++)
1194 {
1195 if (DTestButton (&ppadtsc[x]))
1196 {
1197 r |= 1 << x;
1198 }
1199 }
1200
1201 return r;
1202}
1203
1204static uint32 MouseData[3] = { 0, 0, 0 };
1205static 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