[XConfig] Implementation of XConfig

This commit is contained in:
Gliniak
2026-05-17 21:30:10 +02:00
committed by Radosław Gliński
parent f88bfbe41e
commit 99ea6da18a
31 changed files with 2020 additions and 846 deletions

View File

@@ -27,8 +27,6 @@ extern "C" {
} // extern "C"
DEFINE_bool(enable_xmp, true, "Enables Music Player playback.", "APU");
DEFINE_int32(xmp_default_volume, 70,
"Default music volume if game doesn't set it [0-100].", "APU");
namespace xe {
namespace apu {
@@ -246,7 +244,8 @@ void AudioMediaPlayer::Play() {
OnStateChanged();
if (volume_ == 0.0f) {
volume_ = cvars::xmp_default_volume / 100.0f;
volume_ = kernel_state_->xconfig()->ReadSetting<float>(
kernel::XCONFIG_USER_CATEGORY, kernel::XCONFIG_USER_MUSIC_VOLUME);
}
// Always apply the stored volume to the newly created driver