refactor/feat: Further signature scan changes
> funcionality cleanup, API compatibility should be the same > improve patching performance by skipping vector copy (replaced with span) > chain call wrapper (fixes soudbank hook breaking 32-bit styles)
This commit is contained in:
+5
-2
@@ -927,8 +927,11 @@ void init(HINSTANCE hmodule, const char *model, const char *ext)
|
||||
}
|
||||
|
||||
// Override .text (pattern match)
|
||||
offset_.TX_EnumValidSoundbanks = find_pattern_from(hmodule, "CCCCCCCCCCCCCCCC", "XXXXXXXX", 8, 0,
|
||||
find_asm_leacstr_from(hmodule, R8, "%05d/%05d.2dx") - reinterpret_cast<intptr_t>(hmodule), true);
|
||||
offset_.TX_EnumValidSoundbanks = patch_pipeline(
|
||||
hmodule,
|
||||
[](HMODULE hmodule, intptr_t addr) { return find_asm_leacstr_from(hmodule, R8, "%05d/%05d.2dx"); },
|
||||
[](HMODULE hmodule, intptr_t addr) { return find_pattern_from(hmodule, "CCCCCCCCCCCCCCCC", "XXXXXXXX", 8, 0, addr, true); }
|
||||
);
|
||||
snd_bank::resampler_ = avcodec::BmswTranscoderResampler() == avcodec::bmswac_resampler_none ? snd_bank::resampler_ : avcodec::BmswTranscoderResampler();
|
||||
offset_.TX_EnumValidSoundbanks = avcodec::BmswTranscoderEnumValidSoundbanksAddr() == 0x0 ? offset_.TX_EnumValidSoundbanks : (intptr_t) hmodule + (int64_t) avcodec::BmswTranscoderEnumValidSoundbanksAddr();
|
||||
if (!offset_.TX_EnumValidSoundbanks)
|
||||
|
||||
Reference in New Issue
Block a user