mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user