Fix the hang on windows when wiimote refresh is used during a game.

Fixes issue 4161.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7239 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-02-25 05:19:59 +00:00
parent ef63bccfc1
commit 7d3ad0b1fe
2 changed files with 3 additions and 5 deletions

View File

@ -32,6 +32,7 @@
#include "Common.h"
#include "WiimoteReal.h"
#include "Host.h"
// Identify the wiimote device by its class
#define WM_DEV_CLASS_0 0x04
@ -194,6 +195,8 @@ void Wiimote::RealDisconnect()
if (m_wiimote_thread.joinable())
m_wiimote_thread.join();
Host_ConnectWiimote(index, false);
close(out_sock);
close(in_sock);

View File

@ -22,7 +22,6 @@
#include "IniFile.h"
#include "StringUtil.h"
#include "Timer.h"
#include "../../Host.h"
#include "WiimoteReal.h"
@ -306,8 +305,6 @@ void Wiimote::ThreadFunc()
// rumble briefly
Rumble();
Host_ConnectWiimote(index, true);
// main loop
while (IsConnected())
{
@ -320,8 +317,6 @@ void Wiimote::ThreadFunc()
#endif
Common::SleepCurrentThread(1);
}
Host_ConnectWiimote(index, false);
}
#ifndef _WIN32