mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-10 11:11:32 -10:00
Also fixes DX11.0 support (for Win7 PCs that aren't fully updated), which stopped working after the recent variable refresh rate changes
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Mesen.Interop;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Mesen.Config
|
|
{
|
|
public partial class RefreshTimingConfig : BaseConfig<RefreshTimingConfig>
|
|
{
|
|
[ObservableProperty] public partial Dictionary<CpuType, RefreshTimingConsoleConfig> ConsoleConfig { get; set; } = new();
|
|
[ObservableProperty] public partial bool RefreshOnBreakPause { get; set; } = true;
|
|
[ObservableProperty] public partial bool AutoRefresh { get; set; } = true;
|
|
|
|
public RefreshTimingConfig()
|
|
{
|
|
}
|
|
|
|
public RefreshTimingConsoleConfig GetConsoleConfig(CpuType cpuType)
|
|
{
|
|
if(!ConsoleConfig.TryGetValue(cpuType, out RefreshTimingConsoleConfig? config)) {
|
|
config = new();
|
|
ConsoleConfig[cpuType] = config;
|
|
}
|
|
return config;
|
|
}
|
|
}
|
|
|
|
public partial class RefreshTimingConsoleConfig : BaseConfig<RefreshTimingConsoleConfig>
|
|
{
|
|
[ObservableProperty] public partial int RefreshScanline { get; set; } = 240;
|
|
[ObservableProperty] public partial int RefreshCycle { get; set; } = 0;
|
|
|
|
public RefreshTimingConsoleConfig()
|
|
{
|
|
}
|
|
}
|
|
}
|