Skip to content

Commit b680024

Browse files
committed
slight cleanup, bump version number
1 parent a314d5c commit b680024

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.24)
22

3-
project(pluginloader VERSION 1.0.5)
3+
project(pluginloader VERSION 1.0.6)
44

55
add_library(_pluginloader_base INTERFACE)
66
set(CMAKE_EXPORT_COMPILE_COMMANDS True)
@@ -67,6 +67,7 @@ install(
6767
pluginloader_no_proxy
6868
pluginloader_d3d11
6969
pluginloader_dsound
70+
pluginloader_winmm
7071
pluginloader_xinput1_3
7172
RUNTIME DESTINATION .
7273
)

src/proxy/winmm.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33

44
// Modified copy of https://github.com/Erik-JS/proxy-dll-64/blob/master/winmm/main.cpp
55

6-
// this shit has to be put here to thwart GCC into thinking the real winmm lib has been already included
7-
// to avoid conflicts with the "fake" functions we're exporting here
8-
#define _INC_MMSYSTEM
9-
106
namespace pluginloader::proxy {
117

128
namespace {
@@ -194,8 +190,10 @@ FARPROC winmm_wave_out_set_volume = nullptr;
194190
FARPROC winmm_wave_out_unprepare_header = nullptr;
195191
FARPROC winmm_wave_out_write = nullptr;
196192

197-
} // namespace
193+
} // namespace
198194

195+
// NOLINTBEGIN(readability-identifier-naming, readability-avoid-return-with-void-value)
196+
// clang-format off
199197
DLL_EXPORT void CloseDriver() { return reinterpret_cast<decltype(&CloseDriver)>(winmm_close_driver)(); }
200198
DLL_EXPORT void DefDriverProc() { return reinterpret_cast<decltype(&DefDriverProc)>(winmm_def_driver_proc)(); }
201199
DLL_EXPORT void DriverCallback() { return reinterpret_cast<decltype(&DriverCallback)>(winmm_driver_callback)(); }
@@ -376,9 +374,10 @@ DLL_EXPORT void waveOutSetPlaybackRate() { return reinterpret_cast<decltype(&wav
376374
DLL_EXPORT void waveOutSetVolume() { return reinterpret_cast<decltype(&waveOutSetVolume)>(winmm_wave_out_set_volume)(); }
377375
DLL_EXPORT void waveOutUnprepareHeader() { return reinterpret_cast<decltype(&waveOutUnprepareHeader)>(winmm_wave_out_unprepare_header)(); }
378376
DLL_EXPORT void waveOutWrite() { return reinterpret_cast<decltype(&waveOutWrite)>(winmm_wave_out_write)(); }
377+
// clang-format on
378+
// NOLINTEND(readability-identifier-naming, readability-avoid-return-with-void-value)
379379

380380
void init(HMODULE /*this_dll*/) {
381-
382381
// Suspend all other threads to prevent a giant race condition
383382
const util::ThreadSuspender suspender{};
384383

@@ -428,8 +427,10 @@ void init(HMODULE /*this_dll*/) {
428427
winmm_mci_free_command_resource = GetProcAddress(winmm_dll_handle, "mciFreeCommandResource");
429428
winmm_mci_get_creator_task = GetProcAddress(winmm_dll_handle, "mciGetCreatorTask");
430429
winmm_mci_get_device_id_a = GetProcAddress(winmm_dll_handle, "mciGetDeviceIDA");
431-
winmm_mci_get_device_id_from_element_id_a = GetProcAddress(winmm_dll_handle, "mciGetDeviceIDFromElementIDA");
432-
winmm_mci_get_device_id_from_element_id_w = GetProcAddress(winmm_dll_handle, "mciGetDeviceIDFromElementIDW");
430+
winmm_mci_get_device_id_from_element_id_a =
431+
GetProcAddress(winmm_dll_handle, "mciGetDeviceIDFromElementIDA");
432+
winmm_mci_get_device_id_from_element_id_w =
433+
GetProcAddress(winmm_dll_handle, "mciGetDeviceIDFromElementIDW");
433434
winmm_mci_get_device_id_w = GetProcAddress(winmm_dll_handle, "mciGetDeviceIDW");
434435
winmm_mci_get_driver_data = GetProcAddress(winmm_dll_handle, "mciGetDriverData");
435436
winmm_mci_get_error_string_a = GetProcAddress(winmm_dll_handle, "mciGetErrorStringA");
@@ -584,4 +585,4 @@ void free(void) {
584585
}
585586
}
586587

587-
} // namespace pluginloader::proxy
588+
} // namespace pluginloader::proxy

0 commit comments

Comments
 (0)