refactor/fix: Resolve some wmisc issues
> fix crashes around missing call convention/log hook > enable wmisc for M39 as well, see #8
This commit is contained in:
@@ -889,6 +889,7 @@ public:
|
||||
} tests_("sndb_test");
|
||||
void init(HINSTANCE hmodule, const char *model, const char *ext)
|
||||
{
|
||||
if (to_hash(model) != to_hash("LDJ")) return;
|
||||
if (false && IsDebuggerPresent())
|
||||
{
|
||||
log_warning("hooks::soundbank", "Debugger detected, skipping..");
|
||||
|
||||
+6
-2
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace hooks::wmisc::msacm
|
||||
{
|
||||
typedef MMRESULT (*acmFormatSuggest_t)(HANDLE had, LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest);
|
||||
typedef MMRESULT (__stdcall *acmFormatSuggest_t)(HANDLE had, LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest);
|
||||
static acmFormatSuggest_t acmFormatSuggest;
|
||||
|
||||
static uint64_t hash_waveformatex(const WAVEFORMATEX *pwfx, DWORD fdwSuggest)
|
||||
@@ -129,7 +129,7 @@ extern "C" void __cdecl on_log_msg(char level, const char *scope, const char *ms
|
||||
}
|
||||
void attach(HINSTANCE hmodule)
|
||||
{
|
||||
BmswLogInit_t BmswLogInit;
|
||||
BmswLogInit_t BmswLogInit = nullptr;
|
||||
HMODULE bmsw;
|
||||
if ((bmsw = libutils::try_library(MODULE_PATH / "bmsound-wine.dll")))
|
||||
{
|
||||
@@ -161,6 +161,10 @@ void apply_performance_hacks(HINSTANCE hmodule, const char *model, const char *e
|
||||
msacm::attach(hmodule);
|
||||
bmsound::attach(hmodule);
|
||||
break;
|
||||
case to_hash("M39"):
|
||||
msacm::attach(hmodule);
|
||||
bmsound::attach(hmodule);
|
||||
break;
|
||||
case to_hash("FORCE"):
|
||||
switch (to_hash(ext))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user