It looks like I was too hasty in picking the latest libusb commit (to fix a few Windows build warnings) prior to landing my merged PR.
libusb commit eee6998 had a transfer list bug. Have just tested on c33990a and it's resolved now.
May resolve some outstanding issues around libusb/hidapi (i.e. DS4 not being released on rpcs3 shutdown etc..) or may not.
Fixes three outstanding compile warnings on non-Windows OS... introduces a few more warnings in WindowsOS (issue raised upstream with libusb around WINAPI_CHECK macro)
Re-ordered the 3rd party CMake so libusb is in file order above hidapi (just to have document flow match logical flow)
Also took this opportunity to remove the YAML INSTALL action (by setting YAML_CPP_INSTALL to OFF)
Provided capability to use system library for libusb by providing USE_SYS_LIBUSB option to CMAKE
Tested under:
- [X] Windows 10 2004 OS with DS4 controller
- [X] Windows 10 2004 OS with GCon3 controller
- [X] Linux (Mint 20) with DS4 controller
Silence the wolf from telling us:
#warning "For timing resistance / side-channel attack prevention consider using harden options"
Also removed duplicate defines for Visual Studio project, to remove some additional warnings there.
Add support for compilation on x64 toolchain (x86 cl.exe was running out of heap space in vm.cpp)
Also took the opportunity to change compile optimisation from /Ox to /O2, as /O2 provides better optimisation than does /Ox
Also, we shouldn't be explicitely setting compiler tool defines (__cpp_lib_bitops), so remove that from types.h
libcurl and wolfssl were moved to rpcs3 source control to make buildsystem changes easier.
common_default.props and common_default_macros.props included to project files.
Int and Out Dirs changed to default:
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir> <IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
Turns out the current version of clang doesn't support the [[likely]] and [[unlikely]] attributes, so to ensure good performance, we'll be switching to gcc, at least for now.
- Added support for current default toolset, explitly specified c++17 standard and 8.1 win sdk.
- properties were defined via `common_default.props` and `common_default_macros.props`
Note: There are 2 files because some properties need to be imported before `Microsoft.Cpp.Default.props` , but other common properties can be imported after but they require marco defined in `Microsoft.Cpp.Default.props`.
- Added hidapi and libusb project files to repository to simplify msbuild changes.