| 235 | } |
| 236 | |
| 237 | static void UpdateGP(int w, void *data, int arg) |
| 238 | { |
| 239 | if(w==0) //adelikat, 3/14/09: Changing the joypads to inclusive OR the user's joypad + the Lua joypad, this way lua only takes over the buttons it explicity says to |
| 240 | { //FatRatKnight: Assume lua is always good. If it's doing nothing in particular using my logic, it'll pass-through the values anyway. |
| 241 | #ifdef _S9XLUA_H |
| 242 | joy[0]= *(uint32 *)joyports[0].ptr; |
| 243 | joy[0]= FCEU_LuaReadJoypad(0,joy[0]); |
| 244 | joy[2]= *(uint32 *)joyports[0].ptr >> 16; |
| 245 | joy[2]= FCEU_LuaReadJoypad(2,joy[2]); |
| 246 | #else // without this, there seems to be no input at all without Lua |
| 247 | joy[0] = *(uint32 *)joyports[0].ptr;; |
| 248 | joy[2] = *(uint32 *)joyports[0].ptr >> 16; |
| 249 | #endif |
| 250 | } |
| 251 | else |
| 252 | { |
| 253 | #ifdef _S9XLUA_H |
| 254 | joy[1]= *(uint32 *)joyports[1].ptr >> 8; |
| 255 | joy[1]= FCEU_LuaReadJoypad(1,joy[1]); |
| 256 | joy[3]= *(uint32 *)joyports[1].ptr >> 24; |
| 257 | joy[3]= FCEU_LuaReadJoypad(3,joy[3]); |
| 258 | #else // same goes for the other two pads |
| 259 | joy[1] = *(uint32 *)joyports[1].ptr >> 8; |
| 260 | joy[3] = *(uint32 *)joyports[1].ptr >> 24; |
| 261 | #endif |
| 262 | } |
| 263 | |
| 264 | } |
| 265 | |
| 266 | static void LogGP(int w, MovieRecord* mr) |
| 267 | { |
nothing calls this directly
no test coverage detected