From bc321fedacb4d03ba4319465fb9359dcd91e8a03 Mon Sep 17 00:00:00 2001 From: feos Date: Thu, 9 Jul 2015 02:07:21 +0300 Subject: [PATCH] keep DefaultMessageOptions instead of 2 _different_, _hardcoded_ units. --- BizHawk.Client.Common/config/Config.cs | 114 ++++++++++++------ .../config/MessageConfig.cs | 74 ++++++------ 2 files changed, 111 insertions(+), 77 deletions(-) diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 9c72fee722..7de156e57a 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -174,53 +174,87 @@ namespace BizHawk.Client.Common public static class DefaultMessageOptions { - public const int DispFPSx = 99; - public const int DispFPSy = 99; + public const int + DispFPSx = 0, + DispFPSy = 0, + DispFrameCx = 0, + DispFrameCy = 14, + DispLagx = 0, + DispLagy = 42, + DispInpx = 0, + DispInpy = 28, + DispRecx = 0, + DispRecy = 56, + DispMultix = 0, + DispMultiy = 14, + DispMessagex = 3, + DispMessagey = 0, + DispAutoholdx = 0, + DispAutoholdy = 0, + DispRamWatchx = 0, + DispRamWatchy = 70, + + MessagesColor = -1, + AlertMessageColor = -65536, + LastInputColor = -23296, + MovieInput = -8355712, + + DispFPSanchor = 0, // 0 = UL, 1 = UR, 2 = DL, 3 = DR + DispFrameanchor = 0, + DispLaganchor = 0, + DispInpanchor = 0, + DispRecanchor = 0, + DispMultianchor = 1, + DispMessageanchor = 2, + DispAutoholdanchor = 1; } // Display options - public int MessagesColor = -1; - public int AlertMessageColor = -65536; - public int LastInputColor = -23296; - public int MovieInput = -8355712; public bool DisplayFPS = false; + public bool DisplayFrameCounter = false; + public bool DisplayLagCounter = false; + public bool DisplayInput = false; + public bool DisplayRerecordCount = false; + public bool DisplayStatusBar = true; + + public bool DispBlurry = false; // make display look ugly + public bool DispFixAspectRatio = true; + public bool DispFixScaleInteger = true; + public bool DispFullscreenHacks = true; + public int DispFPSx = DefaultMessageOptions.DispFPSx; public int DispFPSy = DefaultMessageOptions.DispFPSy; - public int DispFPSanchor = 0; // 0 = UL, 1 = UR, 2 = DL, 3 = DR - public bool DisplayFrameCounter = false; - public int DispFrameCx = 0; - public int DispFrameCy = 14; - public int DispFrameanchor = 0; - public bool DisplayLagCounter = false; - public int DispLagx = 0; - public int DispLagy = 42; - public int DispLaganchor = 0; - public bool DisplayInput = false; - public int DispInpx = 0; - public int DispInpy = 28; - public int DispInpanchor = 0; - public bool DisplayRerecordCount = false; - public int DispRecx = 0; - public int DispRecy = 56; - public int DispRecanchor = 0; - public int DispMultix = 0; - public int DispMultiy = 14; - public int DispMultianchor = 1; - public bool DisplayStatusBar = true; - public int DispRamWatchx = 0; - public int DispRamWatchy = 70; - public int DispMessagex = 3; - public int DispMessagey = 0; - public int DispMessageanchor = 2; - public int DispAutoholdx = 0; - public int DispAutoholdy = 0; - public int DispAutoholdanchor = 1; - - public bool DispBlurry = false; // make display look ugly - public bool DispFixAspectRatio = true; - public bool DispFixScaleInteger = true; - public bool DispFullscreenHacks = true; + public int DispFrameCx = DefaultMessageOptions.DispFrameCx; + public int DispFrameCy = DefaultMessageOptions.DispFrameCy; + public int DispLagx = DefaultMessageOptions.DispLagx; + public int DispLagy = DefaultMessageOptions.DispLagy; + public int DispInpx = DefaultMessageOptions.DispInpx; + public int DispInpy = DefaultMessageOptions.DispInpy; + public int DispRecx = DefaultMessageOptions.DispRecx; + public int DispRecy = DefaultMessageOptions.DispRecy; + public int DispMultix = DefaultMessageOptions.DispMultix; + public int DispMultiy = DefaultMessageOptions.DispMultiy; + public int DispRamWatchx = DefaultMessageOptions.DispRamWatchx; + public int DispRamWatchy = DefaultMessageOptions.DispRamWatchy; + public int DispMessagex = DefaultMessageOptions.DispMessagex; + public int DispMessagey = DefaultMessageOptions.DispMessagey; + public int DispAutoholdx = DefaultMessageOptions.DispAutoholdx; + public int DispAutoholdy = DefaultMessageOptions.DispAutoholdy; + public int DispFPSanchor = DefaultMessageOptions.DispFPSanchor; // 0 = UL, 1 = UR, 2 = DL, 3 = DR + public int DispFrameanchor = DefaultMessageOptions.DispFrameanchor; + public int DispLaganchor = DefaultMessageOptions.DispLaganchor; + public int DispInpanchor = DefaultMessageOptions.DispInpanchor; + public int DispRecanchor = DefaultMessageOptions.DispRecanchor; + public int DispMultianchor = DefaultMessageOptions.DispMultianchor; + public int DispMessageanchor = DefaultMessageOptions.DispMessageanchor; + public int DispAutoholdanchor = DefaultMessageOptions.DispAutoholdanchor; + + public int MessagesColor = DefaultMessageOptions.MessagesColor; + public int AlertMessageColor = DefaultMessageOptions.AlertMessageColor; + public int LastInputColor = DefaultMessageOptions.LastInputColor; + public int MovieInput = DefaultMessageOptions.MovieInput; + public int DispPrescale = 1; //warning: we dont even want to deal with changing this at runtime. but we want it changed here for config purposes. so dont check this variable. check in GlobalWin or something like that. diff --git a/BizHawk.Client.EmuHawk/config/MessageConfig.cs b/BizHawk.Client.EmuHawk/config/MessageConfig.cs index a56cb63bd1..c1055a895c 100644 --- a/BizHawk.Client.EmuHawk/config/MessageConfig.cs +++ b/BizHawk.Client.EmuHawk/config/MessageConfig.cs @@ -403,44 +403,34 @@ namespace BizHawk.Client.EmuHawk { Global.Config.DispFPSx = Config.DefaultMessageOptions.DispFPSx; Global.Config.DispFPSy = Config.DefaultMessageOptions.DispFPSy; - Global.Config.DispFrameCx = 0; - Global.Config.DispFrameCy = 12; - Global.Config.DispLagx = 0; - Global.Config.DispLagy = 36; - Global.Config.DispInpx = 0; - Global.Config.DispInpy = 24; - Global.Config.DispRecx = 0; - Global.Config.DispRecy = 48; - Global.Config.DispMultix = 0; - Global.Config.DispMultiy = 14; - Global.Config.DispMessagex = 3; - Global.Config.DispMessagey = 0; - Global.Config.DispAutoholdx = 0; - Global.Config.DispAutoholdy = 0; + Global.Config.DispFrameCx = Config.DefaultMessageOptions.DispFrameCx; + Global.Config.DispFrameCy = Config.DefaultMessageOptions.DispFrameCy; + Global.Config.DispLagx = Config.DefaultMessageOptions.DispLagx; + Global.Config.DispLagy = Config.DefaultMessageOptions.DispLagy; + Global.Config.DispInpx = Config.DefaultMessageOptions.DispInpx; + Global.Config.DispInpy = Config.DefaultMessageOptions.DispInpy; + Global.Config.DispRecx = Config.DefaultMessageOptions.DispRecx; + Global.Config.DispRecy = Config.DefaultMessageOptions.DispRecy; + Global.Config.DispMultix = Config.DefaultMessageOptions.DispMultix; + Global.Config.DispMultiy = Config.DefaultMessageOptions.DispMultiy; + Global.Config.DispMessagex = Config.DefaultMessageOptions.DispMessagex; + Global.Config.DispMessagey = Config.DefaultMessageOptions.DispMessagey; + Global.Config.DispAutoholdx = Config.DefaultMessageOptions.DispAutoholdx; + Global.Config.DispAutoholdy = Config.DefaultMessageOptions.DispAutoholdy; - Global.Config.MessagesColor = -1; - Global.Config.AlertMessageColor = -65536; - Global.Config.LastInputColor = -23296; - Global.Config.MovieInput = -8355712; + Global.Config.DispFPSanchor = Config.DefaultMessageOptions.DispFPSanchor; + Global.Config.DispFrameanchor = Config.DefaultMessageOptions.DispFrameanchor; + Global.Config.DispLaganchor = Config.DefaultMessageOptions.DispLaganchor; + Global.Config.DispInpanchor = Config.DefaultMessageOptions.DispInpanchor; + Global.Config.DispRecanchor = Config.DefaultMessageOptions.DispRecanchor; + Global.Config.DispMultianchor = Config.DefaultMessageOptions.DispMultianchor; + Global.Config.DispMessageanchor = Config.DefaultMessageOptions.DispMessageanchor; + Global.Config.DispAutoholdanchor = Config.DefaultMessageOptions.DispAutoholdanchor; - _messageColor = Global.Config.MessagesColor; - _alertColor = Global.Config.AlertMessageColor; - _lastInputColor = Global.Config.LastInputColor; - _movieInput = Global.Config.MovieInput; - - MessageColorDialog.Color = Color.FromArgb(_messageColor); - AlertColorDialog.Color = Color.FromArgb(_alertColor); - LInputColorDialog.Color = Color.FromArgb(_lastInputColor); - MovieInputColorDialog.Color = Color.FromArgb(_movieInput); - - Global.Config.DispFPSanchor = 0; - Global.Config.DispFrameanchor = 0; - Global.Config.DispLaganchor = 0; - Global.Config.DispInpanchor = 0; - Global.Config.DispRecanchor = 0; - Global.Config.DispMultianchor = 1; - Global.Config.DispMessageanchor = 2; - Global.Config.DispAutoholdanchor = 1; + Global.Config.MessagesColor = Config.DefaultMessageOptions.MessagesColor; + Global.Config.AlertMessageColor = Config.DefaultMessageOptions.AlertMessageColor; + Global.Config.LastInputColor = Config.DefaultMessageOptions.LastInputColor; + Global.Config.MovieInput = Config.DefaultMessageOptions.MovieInput; _dispFpSx = Global.Config.DispFPSx; _dispFpSy = Global.Config.DispFPSy; @@ -466,7 +456,17 @@ namespace BizHawk.Client.EmuHawk _dispRecanchor = Global.Config.DispRecanchor; _dispMultiAnchor = Global.Config.DispMultianchor; _dispMessageAnchor = Global.Config.DispMessageanchor; - _dispAutoholdAnchor = Global.Config.DispAutoholdanchor; + _dispAutoholdAnchor = Global.Config.DispAutoholdanchor; + + _messageColor = Global.Config.MessagesColor; + _alertColor = Global.Config.AlertMessageColor; + _lastInputColor = Global.Config.LastInputColor; + _movieInput = Global.Config.MovieInput; + + MessageColorDialog.Color = Color.FromArgb(_messageColor); + AlertColorDialog.Color = Color.FromArgb(_alertColor); + LInputColorDialog.Color = Color.FromArgb(_lastInputColor); + MovieInputColorDialog.Color = Color.FromArgb(_movieInput); SetMaxXY(); SetColorBox();