• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Controllers v
« Previous 1 ... 232 233 234 235 236 ... 321 Next »

Possible solution for 3rd party Wiimote disconnections?
View New Posts | View Today's Posts

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Possible solution for 3rd party Wiimote disconnections?
12-31-2012, 02:37 PM (This post was last modified: 12-31-2012, 02:38 PM by DaveyJC.)
#3
DaveyJC Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: Dec 2012
I simply lowered the time the real Wiimote thread sleeps from 2ms to 1ms when m_audio_reports FifoQueue is empty, which seems to be most of the time.
This change is done in WiimoteReal.cpp, function Wiimote::ThreadFunc().

This fixes a no-brand-Wiimote bough in Dealextreme last year that was working correctly with GlovePie but not with Dolphin (vibrated but disconnected right away 99% of the times), so I thought it should be related to Dolphin's code. Another wiimote I have, also bought in DX but branded "Nintendo", worked perfectly with Dolphin.

I infer by this chage in code that this 3rd party Wiimote has to be read/written at least once each millisecond not to get disconnected. I've tried this change with Win7 MS stack & Toshiba 8 bluetooth stack.
As performance impact seems to be minimal (same FPS or maybe 1fps lower) on my machine, I think this change should be pushed to master, cause it probably will help with many 3rd party Wiimote connections/disconnections.

Should I do a push? Never did one :-)

diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
index 204a1fc..3c1d0f8 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
@@ -323,7 +323,8 @@ void Wiimote::ThreadFunc()
{
if (m_audio_reports.Size() && !read)
Read();
- Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 2);
+ //Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 2);
+ Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 1);
read = false;
}
#endif
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Possible solution for 3rd party Wiimote disconnections? - DaveyJC - 12-30-2012, 12:20 PM
RE: Possible solution for 3rd party Wiimode disconnections? - pauldacheez - 12-30-2012, 03:17 PM
RE: Possible solution for 3rd party Wiimode disconnections? - DaveyJC - 12-31-2012, 02:37 PM
RE: Possible solution for 3rd party Wiimode disconnections? - pauldacheez - 12-31-2012, 04:32 PM
RE: Possible solution for 3rd party Wiimote disconnections? - DaveyJC - 01-02-2013, 10:08 AM
RE: Possible solution for 3rd party Wiimote disconnections? - pauldacheez - 01-02-2013, 10:15 AM
RE: Possible solution for 3rd party Wiimote disconnections? - frainsa - 01-02-2013, 03:32 PM
RE: Possible solution for 3rd party Wiimote disconnections? - DaveyJC - 01-03-2013, 07:28 AM
RE: Possible solution for 3rd party Wiimote disconnections? - frainsa - 01-03-2013, 07:59 AM
RE: Possible solution for 3rd party Wiimote disconnections? - DaveyJC - 01-08-2013, 09:05 AM
RE: Possible solution for 3rd party Wiimote disconnections? - RavenMorpheus - 01-09-2013, 09:03 PM
RE: Possible solution for 3rd party Wiimote disconnections? - ExtremeDude2 - 01-10-2013, 01:12 AM
Re: Possible solution for 3rd party Wiimote disconnections? - GrayTheWolf - 01-12-2013, 12:34 AM
RE: Possible solution for 3rd party Wiimote disconnections? - sturze - 01-12-2013, 03:42 AM
Re: Possible solution for 3rd party Wiimote disconnections? - GrayTheWolf - 01-13-2013, 01:10 PM
RE: Possible solution for 3rd party Wiimote disconnections? - DaveyJC - 02-28-2013, 01:39 AM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode