mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
33 lines
704 B
C#
33 lines
704 B
C#
using Mesen.Config;
|
|
using Mesen.Interop;
|
|
using ReactiveUI;
|
|
using ReactiveUI.Fody.Helpers;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Mesen.ViewModels
|
|
{
|
|
public class AudioPlayerViewModel : ViewModelBase
|
|
{
|
|
[Reactive] public AudioPlayerConfig Config { get; set; }
|
|
[Reactive] public bool IsPaused { get; set; }
|
|
|
|
public AudioPlayerViewModel()
|
|
{
|
|
Config = ConfigManager.Config.AudioPlayer;
|
|
|
|
this.WhenAnyValue(x => x.Config.Volume).Subscribe((vol) => {
|
|
Config.ApplyConfig();
|
|
});
|
|
}
|
|
|
|
public void UpdatePauseFlag()
|
|
{
|
|
IsPaused = EmuApi.IsPaused();
|
|
}
|
|
}
|
|
}
|