fixed mouse cursor after fullscreen change in D3D, fixed fullscreen from maximized screen in D3D (by xDarkice)
This commit is contained in:
1 parent
3cc02a189a
commit
6734ddb7e0
1 file changed
+29
-6
@@ -207,6 +207,27 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
this.ClientSize = this.ClientSize;
|
this.ClientSize = this.ClientSize;
|
||||||
RResize();
|
RResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void WndProc(ref Message m)
|
||||||
|
{
|
||||||
|
switch (m.Msg)
|
||||||
|
{
|
||||||
|
case 0x112: // WM_SYSCOMMAND
|
||||||
|
switch ((int)m.WParam & 0xFFF0)
|
||||||
|
{
|
||||||
|
case 0xF100: // SC_KEYMENU
|
||||||
|
m.Result = IntPtr.Zero;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
base.WndProc(ref m);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
base.WndProc(ref m);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion form events
|
#endregion form events
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resizes the viewport
|
/// Resizes the viewport
|
||||||
@@ -277,10 +298,15 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
CenterToScreen();
|
CenterToScreen();
|
||||||
_fullscreen = true;
|
_fullscreen = true;
|
||||||
CConfig.FullScreen = EOffOn.TR_CONFIG_ON;
|
CConfig.FullScreen = EOffOn.TR_CONFIG_ON;
|
||||||
RResize();
|
|
||||||
|
|
||||||
Cursor.Hide();
|
if (this.WindowState == FormWindowState.Maximized)
|
||||||
_Mouse.Visible = true;
|
{
|
||||||
|
this.WindowState = FormWindowState.Normal;
|
||||||
|
RResize();
|
||||||
|
this.WindowState = FormWindowState.Maximized;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
RResize();
|
||||||
|
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
}
|
}
|
||||||
@@ -295,9 +321,6 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
_fullscreen = false;
|
_fullscreen = false;
|
||||||
CConfig.FullScreen = EOffOn.TR_CONFIG_OFF;
|
CConfig.FullScreen = EOffOn.TR_CONFIG_OFF;
|
||||||
|
|
||||||
Cursor.Hide();
|
|
||||||
_Mouse.Visible = true;
|
|
||||||
|
|
||||||
CConfig.SaveConfig();
|
CConfig.SaveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user