audio_patches: implemented music volume

This commit is contained in:
Hyper 2024-11-19 18:22:43 +00:00
parent b7b1966f44
commit 1a8a038270
2 changed files with 13 additions and 0 deletions

View file

@ -68,6 +68,7 @@ set(SWA_PATCHES_CXX_SOURCES
"patches/ui/CHudPause_patches.cpp" "patches/ui/CHudPause_patches.cpp"
"patches/ui/CTitleMenu_patches.cpp" "patches/ui/CTitleMenu_patches.cpp"
"patches/ui/frontend_listener.cpp" "patches/ui/frontend_listener.cpp"
"patches/audio_patches.cpp"
"patches/camera_patches.cpp" "patches/camera_patches.cpp"
"patches/fps_patches.cpp" "patches/fps_patches.cpp"
"patches/misc_patches.cpp" "patches/misc_patches.cpp"

View file

@ -0,0 +1,12 @@
#include <cpu/guest_code.h>
#include <cfg/config.h>
PPC_FUNC_IMPL(__imp__sub_82B4E130);
PPC_FUNC(sub_82B4E130)
{
auto pMusicVolume = (be<float>*)g_memory.Translate(ctx.r3.u32);
*pMusicVolume = Config::MusicVolume;
__imp__sub_82B4E130(ctx, base);
}