fix visual studio build
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
int wii_board_handshake(struct wiimote_t* wm, struct wii_board_t* wb, byte* data, uint16_t len) {
|
||||
|
||||
byte * bufptr;
|
||||
/* decrypt data */
|
||||
#ifdef WITH_WIIUSE_DEBUG
|
||||
int i;
|
||||
@@ -67,7 +67,7 @@ int wii_board_handshake(struct wiimote_t* wm, struct wii_board_t* wb, byte* data
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
byte * bufptr = data + 4;
|
||||
bufptr = data + 4;
|
||||
wb->ctr[0] = unbuffer_big_endian_uint16_t(&bufptr);
|
||||
wb->cbr[0] = unbuffer_big_endian_uint16_t(&bufptr);
|
||||
wb->ctl[0] = unbuffer_big_endian_uint16_t(&bufptr);
|
||||
|
||||
@@ -553,6 +553,7 @@ struct wiimote_t* wiiuse_get_by_id(struct wiimote_t** wm, int wiimotes, int unid
|
||||
int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte len) {
|
||||
byte buf[21] = {0}; /* the payload is always 23 */
|
||||
|
||||
byte * bufPtr = buf;
|
||||
if (!wm || !WIIMOTE_IS_CONNECTED(wm))
|
||||
return 0;
|
||||
if (!data || !len)
|
||||
@@ -570,9 +571,8 @@ int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte
|
||||
}
|
||||
#endif
|
||||
|
||||
byte * bufPtr = buf;
|
||||
/* the offset is in big endian */
|
||||
buffer_big_endian_uint32_t(&bufPtr, addr);
|
||||
buffer_big_endian_uint32_t(&bufPtr, (uint32_t)addr);
|
||||
|
||||
/* length */
|
||||
buffer_big_endian_uint8_t(&bufPtr, len);
|
||||
|
||||
Reference in New Issue
Block a user