* Update the status of the power pad input device. */
| 1177 | * Update the status of the power pad input device. |
| 1178 | */ |
| 1179 | static uint32 |
| 1180 | UpdatePPadData (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 | |
| 1204 | static uint32 MouseData[3] = { 0, 0, 0 }; |
| 1205 | static int32 MouseRelative[3] = { 0, 0, 0 }; |
no test coverage detected