Fixed the problem which was causing wonky IR behavior in windows - use memmov() instead :) - re-enabled optimizations in wiiuse
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4611 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
6145dd2967
commit
574a03b1e1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -205,8 +205,8 @@ int wiiuse_io_read(struct wiimote_t* wm) {
|
|||
|
||||
// This needs to be done even if ReadFile fails, essential during init
|
||||
// Move the data over one, so we can add back in 0xa2
|
||||
memcpy(wm->event_buf + 1, wm->event_buf, sizeof(wm->event_buf) - 1);
|
||||
wm->event_buf[0] = 0xa2; // Put back in the crazy Data that Windows strips out
|
||||
memmove(wm->event_buf + 1, wm->event_buf, sizeof(wm->event_buf) - 1);
|
||||
wm->event_buf[0] = 0xa2;
|
||||
|
||||
ResetEvent(wm->hid_overlap.hEvent);
|
||||
return 1;
|
||||
|
@ -224,7 +224,7 @@ int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len) {
|
|||
case WIIUSE_STACK_UNKNOWN:
|
||||
{
|
||||
/* try to auto-detect the stack type */
|
||||
if (i = WriteFile(wm->dev_handle, buf + 1, 22, &bytes, &wm->hid_overlap)) {
|
||||
if (i = WriteFile(wm->dev_handle, buf + 1, len - 1, &bytes, &wm->hid_overlap)) {
|
||||
/* bluesoleil will always return 1 here, even if it's not connected */
|
||||
wm->stack = WIIUSE_STACK_BLUESOLEIL;
|
||||
return i;
|
||||
|
@ -243,7 +243,7 @@ int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len) {
|
|||
return HidD_SetOutputReport(wm->dev_handle, buf + 1, len - 1);
|
||||
|
||||
case WIIUSE_STACK_BLUESOLEIL:
|
||||
return WriteFile(wm->dev_handle, buf + 1, 22, &bytes, &wm->hid_overlap);
|
||||
return WriteFile(wm->dev_handle, buf + 1, len - 1, &bytes, &wm->hid_overlap);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
AdditionalIncludeDirectories="C:\WinDDK\7600.16385.0\inc\api;C:\WinDDK\7600.16385.0\inc\crt"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS"
|
||||
|
@ -147,7 +147,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="2"
|
||||
AdditionalIncludeDirectories="C:\WinDDK\7600.16385.0\inc\api;C:\WinDDK\7600.16385.0\inc\crt"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS;_WIN64"
|
||||
|
|
Loading…
Reference in New Issue