mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Remove unneeded NvAPI_Mosaic_GetSupportedTopoInfo function
This function isn't needed, but seems to be unreliable when it's used. So diabling it within NVIDIALibrary to reduce the chances of there being memory errors thrown.
This commit is contained in:
parent
bd16ecc8e9
commit
076f9524cd
@ -26,8 +26,8 @@ using System.Resources;
|
||||
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("2.4.0.41")]
|
||||
[assembly: AssemblyFileVersion("2.4.0.41")]
|
||||
[assembly: AssemblyVersion("2.4.0.43")]
|
||||
[assembly: AssemblyFileVersion("2.4.0.43")]
|
||||
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
||||
|
@ -470,7 +470,7 @@ namespace DisplayMagicianShared.NVIDIA
|
||||
}
|
||||
|
||||
// Get current Supported Mosaic Topology info (check whether Mosaic is on)
|
||||
NV_MOSAIC_SUPPORTED_TOPO_INFO_V2 mosaicSupportedTopoInfo = new NV_MOSAIC_SUPPORTED_TOPO_INFO_V2();
|
||||
/*NV_MOSAIC_SUPPORTED_TOPO_INFO_V2 mosaicSupportedTopoInfo = new NV_MOSAIC_SUPPORTED_TOPO_INFO_V2();
|
||||
NVStatus = NVImport.NvAPI_Mosaic_GetSupportedTopoInfo(ref mosaicSupportedTopoInfo, NV_MOSAIC_TOPO_TYPE.ALL);
|
||||
if (NVStatus == NVAPI_STATUS.NVAPI_OK)
|
||||
{
|
||||
@ -513,7 +513,7 @@ namespace DisplayMagicianShared.NVIDIA
|
||||
else
|
||||
{
|
||||
SharedLogger.logger.Warn($"NVIDIALibrary/GetNVIDIADisplayConfig: There are no valid Mosaic Topologies available with this display layout.");
|
||||
}
|
||||
}*/
|
||||
|
||||
// Get current Mosaic Topology settings in brief (check whether Mosaic is on)
|
||||
NV_MOSAIC_TOPO_BRIEF mosaicTopoBrief = new NV_MOSAIC_TOPO_BRIEF();
|
||||
|
@ -81,6 +81,12 @@ namespace DisplayMagician.UIForms
|
||||
logger.Error($"DisplayProfileForm/Apply_Click: Error applying the Profile {_selectedProfile.Name}. Unable to change the display layout.");
|
||||
}
|
||||
|
||||
// Recenter the Window
|
||||
RecenterWindow();
|
||||
}
|
||||
|
||||
private void RecenterWindow()
|
||||
{
|
||||
// Center the MainAppForm
|
||||
Program.AppMainForm.Top = (Screen.PrimaryScreen.Bounds.Height - Program.AppMainForm.Height) / 2;
|
||||
Program.AppMainForm.Left = (Screen.PrimaryScreen.Bounds.Width - Program.AppMainForm.Width) / 2;
|
||||
@ -545,14 +551,16 @@ namespace DisplayMagician.UIForms
|
||||
ChangeSelectedProfile(ProfileRepository.GetActiveProfile());
|
||||
// Refresh the Profile UI
|
||||
RefreshDisplayProfileUI();
|
||||
// Recenter the Window
|
||||
RecenterWindow();
|
||||
}
|
||||
|
||||
private void txt_profile_save_name_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode.Equals(Keys.Enter))
|
||||
{
|
||||
MessageBox.Show("Click works!", "Click works", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
|
||||
//MessageBox.Show("Click works!", "Click works", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
btn_save.PerformClick();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user