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

@ -36,6 +36,10 @@
#pragma comment(lib, "Bthprops.lib")
#endif
#ifdef __APPLE__
#import <Foundation/NSAutoreleasePool.h>
#endif
unsigned int g_wiimote_sources[MAX_WIIMOTES];
namespace WiimoteReal
@ -468,6 +472,10 @@ void StopWiimoteThreads()
THREAD_RETURN WiimoteThreadFunc(void* arg)
{
#ifdef __APPLE__
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
#endif
Wiimote* const wiimote = (Wiimote*)arg;
{
@ -492,6 +500,9 @@ THREAD_RETURN WiimoteThreadFunc(void* arg)
Common::SleepCurrentThread(1);
}
#ifdef __APPLE__
[pool release];
#endif
return 0;
}