Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ pluginloader_add_impl(dinput8 "src/proxy/dinput8.cpp")
pluginloader_add_impl(dsound "src/proxy/dsound.cpp" "src/proxy/dsound.def")
pluginloader_add_impl(winmm "src/proxy/winmm.cpp")
pluginloader_add_impl(xinput1_3 "src/proxy/xinput1_3.cpp" "src/proxy/xinput1_3.def")
pluginloader_add_impl(wsock32 "src/proxy/wsock32.cpp" "src/proxy/wsock32.def")

install(
TARGETS
Expand All @@ -71,5 +72,6 @@ install(
pluginloader_dsound
pluginloader_winmm
pluginloader_xinput1_3
pluginloader_wsock32
RUNTIME DESTINATION .
)
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"value": "Win32",
"strategy": "external"
},
"toolchainFile": "common_cmake/clang-x86.cmake"
"toolchainFile": "common_cmake/msvc.cmake"
},
{
"name": "_msvc_x64",
Expand Down
2 changes: 1 addition & 1 deletion src/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void load(HMODULE this_dll) {
buf[0] = '\0';
}

auto plugins_dir = std::filesystem::path{buf}.parent_path() / PLUGINS_DIR_NAME;
const auto plugins_dir = std::filesystem::path{buf}.parent_path() / PLUGINS_DIR_NAME;
if (!std::filesystem::exists(plugins_dir)) {
std::filesystem::create_directories(plugins_dir);
return;
Expand Down
6 changes: 3 additions & 3 deletions src/proxy/d3d11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FARPROC d3d11_on_12_create_device_ptr = nullptr;

} // namespace

// NOLINTBEGIN(readability-identifier-naming, readability-identifier-length)
// NOLINTBEGIN(readability-identifier-naming, readability-identifier-length, misc-const-correctness)

#ifdef __MINGW32__
#pragma GCC diagnostic push
Expand Down Expand Up @@ -92,7 +92,7 @@ DLL_EXPORT HRESULT D3D11On12CreateDevice(void* pDevice,
#pragma GCC diagnostic pop
#endif

// NOLINTEND(readability-identifier-naming, readability-identifier-length)
// NOLINTEND(readability-identifier-naming, readability-identifier-length, misc-const-correctness)

void init(HMODULE /*this_dll*/) {
// Suspend all other threads to prevent a giant race condition
Expand All @@ -104,7 +104,7 @@ void init(HMODULE /*this_dll*/) {
return;
}

auto system_dx11 = std::filesystem::path{static_cast<wchar_t*>(buf)} / "d3d11.dll";
const auto system_dx11 = std::filesystem::path{static_cast<wchar_t*>(buf)} / "d3d11.dll";
dx11_dll_handle = LoadLibraryA(system_dx11.generic_string().c_str());
if (dx11_dll_handle == nullptr) {
std::cerr << "Unable to find system d3d11.dll! We're probably about to crash.\n";
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/dinput8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void init(HMODULE /*this_dll*/) {
return;
}

auto system_dinput8 = std::filesystem::path{static_cast<wchar_t*>(buf)} / "dinput8.dll";
const auto system_dinput8 = std::filesystem::path{static_cast<wchar_t*>(buf)} / "dinput8.dll";
dinput8_dll_handle = LoadLibraryA(system_dinput8.generic_string().c_str());
if (dinput8_dll_handle == nullptr) {
std::cerr << "Unable to find system dinput8.dll! We're probably about to crash.\n";
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/dsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void init(HMODULE /*this_dll*/) {
return;
}

auto system_dsound = std::filesystem::path{static_cast<wchar_t*>(buf)} / "dsound.dll";
const auto system_dsound = std::filesystem::path{static_cast<wchar_t*>(buf)} / "dsound.dll";
dsound_dll_handle = LoadLibraryA(system_dsound.generic_string().c_str());
if (dsound_dll_handle == nullptr) {
std::cerr << "Unable to find system dsound.dll! We're probably about to crash.\n";
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/winmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void init(HMODULE /*this_dll*/) {
return;
}

auto system_winmm = std::filesystem::path{static_cast<wchar_t*>(buf)} / "winmm.dll";
const auto system_winmm = std::filesystem::path{static_cast<wchar_t*>(buf)} / "winmm.dll";
winmm_dll_handle = LoadLibraryA(system_winmm.generic_string().c_str());
if (winmm_dll_handle == nullptr) {
std::cerr << "Unable to find system winmm.dll! We're probably about to crash.\n";
Expand Down
Loading
Loading