Move NSAutoreleasePool handling into the proper entry/exit points

for the real wiimote thread as for the other threads.

Turns out we use OS X bluetooth API's that were introduced in 10.5.4.
 
Remove vestiges of previously removed wiiuse_set_bluetooth_stack().

XXX We should probably have a Common equivalent of htonl and friends.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6531 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-12-05 16:18:09 +00:00
parent 5910ef259c
commit 4934cd29b3
6 changed files with 27 additions and 43 deletions

View File

@ -300,7 +300,11 @@ int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte
#endif
/* the offset is in big endian */
*(int*)(buf) = Common::swap32(addr); /* XXX only if little-endian */
#ifdef __BIG_ENDIAN__
*(int*)(buf) = addr;
#else
*(int*)(buf) = Common::swap32(addr);
#endif
/* length */
*(byte*)(buf + 4) = len;
@ -366,26 +370,6 @@ int wiiuse_send(struct wiimote_t* wm, byte report_type, byte* msg, int len) {
}
/**
* @brief Set the bluetooth stack type to use.
*
* @param wm Array of wiimote_t structures.
* @param wiimotes Number of objects in the wm array.
* @param type The type of bluetooth stack to use.
*/
void wiiuse_set_bluetooth_stack(struct wiimote_t** wm, int wiimotes, enum win_bt_stack_t type) {
#ifdef _WIN32
int i;
if (!wm) return;
for (i = 0; i < wiimotes; ++i)
wm[i]->stack = type;
#endif
}
/**
* @brief Set the normal and expansion handshake timeouts.
*