diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 7663e11078..dc07ddd7d7 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -241,7 +241,11 @@ bool Rename(const std::string &srcFilename, const std::string &destFilename) { INFO_LOG(COMMON, "Rename: %s --> %s", srcFilename.c_str(), destFilename.c_str()); +#ifdef _WIN32 + if (_trename(UTF8ToTStr(srcFilename).c_str(), UTF8ToTStr(destFilename).c_str()) == 0) +#else if (rename(srcFilename.c_str(), destFilename.c_str()) == 0) +#endif return true; ERROR_LOG(COMMON, "Rename: failed %s --> %s: %s", srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_hid.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_hid.cpp index e663d737c2..1a570315cc 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_hid.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_hid.cpp @@ -398,12 +398,12 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize) Memory::WriteBigEData((const u8*)&wii_device, OffsetBuffer, Align(wii_device.bLength, 4)); OffsetBuffer += Align(wii_device.bLength, 4); bool deviceValid = true; + bool isHID = false; for (c = 0; deviceValid && c < desc.bNumConfigurations; c++) { struct libusb_config_descriptor *config = NULL; int cRet = libusb_get_config_descriptor(device, c, &config); - // do not try to use usb devices with more than one interface, games can crash if(cRet == 0 && config->bNumInterfaces <= MAX_HID_INTERFACES) { @@ -415,10 +415,14 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize) for (ic = 0; ic < config->bNumInterfaces; ic++) { const struct libusb_interface *interfaceContainer = &config->interface[ic]; + for (i = 0; i < interfaceContainer->num_altsetting; i++) { const struct libusb_interface_descriptor *interface = &interfaceContainer->altsetting[i]; + if (interface->bInterfaceClass == LIBUSB_CLASS_HID) + isHID = true; + WiiHIDInterfaceDescriptor wii_interface; ConvertInterfaceToWii(&wii_interface, interface); Memory::WriteBigEData((const u8*)&wii_interface, OffsetBuffer, Align(wii_interface.bLength, 4)); @@ -448,6 +452,12 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize) } } // configs + if (!isHID) + { + deviceValid = false; + OffsetBuffer = OffsetStart; + } + if (deviceValid) { Memory::Write_U32(OffsetBuffer-OffsetStart, OffsetStart); // fill in length diff --git a/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp b/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp index 0caa2ed7e8..8db1580ef7 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp @@ -236,14 +236,14 @@ void WiiSocket::update(bool read, bool write, bool except) socklen_t addrlen = sizeof(sockaddr_in); int ret = (s32)accept(fd, (sockaddr*)&local_name, &addrlen); - ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", false); + ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", true); WiiSockMan::Convert(local_name, *wii_name, addrlen); } else { int ret = (s32)accept(fd, NULL, 0); - ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", false); + ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", true); } WiiSockMan::getInstance().addSocket(ReturnValue); @@ -432,7 +432,7 @@ void WiiSocket::update(bool read, bool write, bool except) // send/sendto only handles MSG_OOB flags &= SO_MSG_OOB; - sockaddr_in local_name; + sockaddr_in local_name = {0}; if (has_destaddr) { WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferIn2 + 0x0C); diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 37dd449922..a5416465ad 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -131,12 +131,12 @@ bool IsInvalidVersion() return false; } -// Timebomb only active from 2013-Nov-07. +// Timebomb only active from 2014-Jan-01. bool IsTimebombActive() { SYSTEMTIME t; GetSystemTime(&t); - return (t.wYear > 2013) || (t.wMonth > 11) || (t.wMonth >= 11 && t.wDay >= 07); + return (t.wYear >= 2014); } #endif diff --git a/Source/Core/DolphinWX/Src/WxUtils.cpp b/Source/Core/DolphinWX/Src/WxUtils.cpp index 173c07fbcc..f33dbb9db2 100644 --- a/Source/Core/DolphinWX/Src/WxUtils.cpp +++ b/Source/Core/DolphinWX/Src/WxUtils.cpp @@ -24,11 +24,13 @@ void Launch(const char *filename) void Explore(const char *path) { wxString wxPath = StrToWxStr(path); +#ifndef _WIN32 // Default to file if (! wxPath.Contains(wxT("://"))) { wxPath = wxT("file://") + wxPath; } +#endif #ifdef __WXGTK__ wxPath.Replace(wxT(" "), wxT("\\ ")); diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props index e1201912fd..a09f84f7d7 100644 --- a/Source/VSProps/Base.props +++ b/Source/VSProps/Base.props @@ -6,6 +6,16 @@ $(Platform)\$(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ + + $(DXSDK_DIR)Include;$(IncludePath) + $(DXSDK_DIR)Lib\x86;$(LibraryPath) + $(DXSDK_DIR)Utilities\Bin\x86;$(ExecutablePath) + + + $(DXSDK_DIR)Include;$(IncludePath) + $(DXSDK_DIR)Lib\x64;$(LibraryPath) + $(DXSDK_DIR)Utilities\Bin\x64;$(ExecutablePath) + _CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;USE_UPNP;%(PreprocessorDefinitions)