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


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › Dolphin Patches (Archive) v
« Previous 1 ... 3 4 5 6 7 Next »

[FIX] Pair-up button fixed@win32 + bugfixing WIIUSE/implemented unexpected_disconnect
View New Posts | View Today's Posts

Poll: useful fix/patch?
yes
no
no changes noticed
[Show Results]
 
 
Pages (2): 1 2 Next »
Thread Rating:
  • 4 Vote(s) - 3.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[FIX] Pair-up button fixed@win32 + bugfixing WIIUSE/implemented unexpected_disconnect
04-09-2010, 01:26 PM (This post was last modified: 04-09-2010, 08:46 PM by schez.)
#1
schez Offline
Member
***
Posts: 177
Threads: 9
Joined: Sep 2009
Question 
The old and rusty wiiuse plugin is leaking CreateFile() handles on wiiuse_Find() and on wiiuse_unexpected_disconnects.

I fixed most of the leaking within wiiuse, allowing us to re-pair wiimotes now infinite times w/o the need to close dolphin each time. This should also fix some problems regarding unsuccessfull pairups.
However, its not perfect yet, but the biggest handle leaks are closed.

You'll just need to replace your old wiiuse.dll/plugin_wiimote.dll with those new ones.

[WIIUSE]
wiiuse.dll x64 : http://archiv.to/GET/FILE4BBE9B36A1832
wiiuse.dll x32 : http://archiv.to/GET/FILE4BBE9B55A981C

wiiuse fix/patch diff file:
http://pastie.org/pastes/910846/download?key=xwrbhvmf4nlhk6y6yzga

[PLUGIN_WIIMOTE]
Plugin_Wiimote.dll x64 http://archiv.to/GET/FILE4BBEA6311CD22

wiimote_real.cpp fix, diff file:
http://pastie.org/pastes/910882/download?key=zq8h81sa7oyqr2gleipig

Notes on pairing up wiimotes in dolphin[ms bt stack]:
Best way to pair up your wiimote is, first start up dolphin, go into the wiimote plugin, turn on your bluetooth radio, press 1+2 on your wiimote(s), press the pair up button, wait till its ungrayed again, and press the Refresh Realwiimotes button.
you can also pair up multiple wiimotes in one go, just press 1+2 on all wiimotes at around the same time, and when all are blinking press the pair up button.
C2D 2.4Ghz; 4GB; Geforce 9700M; Win7/X64.
...::: Join us on: irc.efnet.org #dolphin-emu :::...
http://snzgoo.blogspot.com/
Website Find
04-09-2010, 08:57 PM (This post was last modified: 04-09-2010, 09:27 PM by death-droid.)
#2
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
Ah cool Schez, I'll commit it for you if anyone finds it helps out (Unless you have SVN access).
Just wondering if you would be able to provide me with a link to the stuff you need to compile Wiiuse, I can't seem to find how to.
Same with how to compile both 64 bit with Visual Studio Express because the stupid SDK's don't seem to work with it.
Find
04-09-2010, 09:26 PM (This post was last modified: 04-10-2010, 03:08 AM by schez.)
#3
schez Offline
Member
***
Posts: 177
Threads: 9
Joined: Sep 2009
You'll need the windows driver kit
WDK: http://www.microsoft.com/whdc/devtools/wdk/wdkpkg.mspx
That should do the trick
PS: The WDK is also one of the reasons why wiiuse hasn't been merged into dolphin yet, you would need it to compile dolphin itself then.
PS2; yea go ahead, commit pls, i refused to have svn accessTongue btw its sanchez not schez.Wink
C2D 2.4Ghz; 4GB; Geforce 9700M; Win7/X64.
...::: Join us on: irc.efnet.org #dolphin-emu :::...
http://snzgoo.blogspot.com/
Website Find
04-10-2010, 02:09 PM
#4
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
Sanchez I need the .lib file for 64 build since I still need to get the stupid 64bit compiler to install properly.
Find
04-10-2010, 02:49 PM
#5
shuffle2 Offline
godisgovernment
*
Project Owner  Developers (Administrators)
Posts: 699
Threads: 17
Joined: Mar 2009
sanchez: your patches were some crazy format that tortoisesvn hated.
Here is a sane combined patch

I would have committed it when I did this, but just from looking at it, it looks like it would break non-win32 build of wiiuse...

also, why
Code:
return ((BOOLEAN) i);
?
On my system, BOOLEAN is defined as char. The function (wiiuse_io_write) returns int.


Attached Files
.patch   wiiuse_pairing.patch (Size: 6.16 KB / Downloads: 188)
Find
04-10-2010, 04:07 PM
#6
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
From the look of it, it shouldn't break the build of a non-win32 build Shuffle2.
Find
04-10-2010, 04:41 PM
#7
shuffle2 Offline
godisgovernment
*
Project Owner  Developers (Administrators)
Posts: 699
Threads: 17
Joined: Mar 2009
sure it will. look closer Smile
Find
04-10-2010, 05:10 PM
#8
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
Wait a minute I think i see....
CloseHandle(wm->dev_handle);
^^^^^^^^^^^^^^^^^^^^
That is it isn't it?

If so couldn't you just ifdef it like so

Code:
    #ifdef WIN32
    if (wm->event == WIIUSE_UNEXPECTED_DISCONNECT)
        CloseHandle(wm->dev_handle);
    else
    #endif
    wm->event = WIIUSE_DISCONNECT;

or this (Untested)
Code:
    if (wm->event == WIIUSE_UNEXPECTED_DISCONNECT)
    {
        #ifdef WIN32
        CloseHandle(wm->dev_handle);
        #else
        close(wm->out_sock);
        close(wm->in_sock);
        #endif
    }
Find
04-10-2010, 05:18 PM
#9
shuffle2 Offline
godisgovernment
*
Project Owner  Developers (Administrators)
Posts: 699
Threads: 17
Joined: Mar 2009
Yes! Smile
I would suggest not committing it until someone has tested on linux/osx, though.
Find
04-10-2010, 05:51 PM (This post was last modified: 04-10-2010, 05:52 PM by death-droid.)
#10
death-droid Offline
Member
***
Posts: 180
Threads: 0
Joined: Apr 2009
Ok. sure I'll wait Tongue
EDIT:
Shuffle2 should I add in the motion plus that's in the Libogc version of Wiiuse, plus one more thing should we be use the decrypted values like the libogc version rather then having to decrypt absolutely everything.
Find
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • 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