Ryujinx/Ryujinx.UI/UI/GeneralPage.cs

37 lines
881 B
C#
Raw Normal View History

2018-04-19 18:21:16 +00:00
using Gtk;
using System;
using GUI = Gtk.Builder.ObjectAttribute;
namespace Ryujinx.UI.UI
{
public class GeneralPage : Alignment
{
Alignment Alignment;
[GUI] CheckButton MemoryChecksToggle;
Builder builder = new Builder("GeneralPage.glade");
public GeneralPage(): base(0.5f, 0.5f, 1, 1)
{
builder.Autoconnect(this);
Alignment = (Alignment)builder.GetObject("GeneralLayout");
MemoryChecksToggle.Toggled += MemoryChecksToggle_Toggled;
MemoryChecksToggle.Active = !AOptimizations.DisableMemoryChecks;
}
private void MemoryChecksToggle_Toggled(object sender, EventArgs e)
{
AOptimizations.DisableMemoryChecks = !MemoryChecksToggle.Active;
}
public Widget GetWidget()
{
return Alignment;
}
}
}