mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-09 18:45:40 +00:00
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:
parent
ef63bccfc1
commit
7d3ad0b1fe
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "WiimoteReal.h"
|
#include "WiimoteReal.h"
|
||||||
|
#include "Host.h"
|
||||||
|
|
||||||
// Identify the wiimote device by its class
|
// Identify the wiimote device by its class
|
||||||
#define WM_DEV_CLASS_0 0x04
|
#define WM_DEV_CLASS_0 0x04
|
||||||
@ -194,6 +195,8 @@ void Wiimote::RealDisconnect()
|
|||||||
if (m_wiimote_thread.joinable())
|
if (m_wiimote_thread.joinable())
|
||||||
m_wiimote_thread.join();
|
m_wiimote_thread.join();
|
||||||
|
|
||||||
|
Host_ConnectWiimote(index, false);
|
||||||
|
|
||||||
close(out_sock);
|
close(out_sock);
|
||||||
close(in_sock);
|
close(in_sock);
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "../../Host.h"
|
|
||||||
|
|
||||||
#include "WiimoteReal.h"
|
#include "WiimoteReal.h"
|
||||||
|
|
||||||
@ -306,8 +305,6 @@ void Wiimote::ThreadFunc()
|
|||||||
// rumble briefly
|
// rumble briefly
|
||||||
Rumble();
|
Rumble();
|
||||||
|
|
||||||
Host_ConnectWiimote(index, true);
|
|
||||||
|
|
||||||
// main loop
|
// main loop
|
||||||
while (IsConnected())
|
while (IsConnected())
|
||||||
{
|
{
|
||||||
@ -320,8 +317,6 @@ void Wiimote::ThreadFunc()
|
|||||||
#endif
|
#endif
|
||||||
Common::SleepCurrentThread(1);
|
Common::SleepCurrentThread(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Host_ConnectWiimote(index, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user