Fix wrong centering of window
This commit is contained in:
1 parent
2d99bbd2ed
commit
4e17745be0
1 file changed
+3
-4
@@ -99,7 +99,8 @@ namespace Vocaluxe.Lib.Draw
|
||||
|
||||
public COpenGL()
|
||||
{
|
||||
_Form = new CFormHook();
|
||||
_Form = new CFormHook {ClientSize = new Size(CConfig.ScreenW, CConfig.ScreenH)};
|
||||
//OpenGL needs that here but D3D needs it in the constructor, so do NOT unify!
|
||||
|
||||
//Check AA Mode
|
||||
CConfig.AAMode = (EAntiAliasingModes)_CheckAntiAliasingMode((int)CConfig.AAMode);
|
||||
@@ -124,6 +125,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
_Control.VSync = CConfig.VSync == EOffOn.TR_CONFIG_ON;
|
||||
|
||||
_Form.Controls.Add(_Control);
|
||||
_Control.ClientSize = _Form.ClientSize;
|
||||
|
||||
_Control.KeyDown += _OnKeyDown;
|
||||
_Control.PreviewKeyDown += _OnPreviewKeyDown;
|
||||
@@ -229,9 +231,6 @@ namespace Vocaluxe.Lib.Draw
|
||||
if (!base.Init())
|
||||
return false;
|
||||
|
||||
//OpenGL needs that here but D3D needs it in the constructor, so do NOT unify!
|
||||
_Form.ClientSize = new Size(CConfig.ScreenW, CConfig.ScreenH);
|
||||
|
||||
// Init Texturing
|
||||
GL.Enable(EnableCap.Texture2D);
|
||||
|
||||
|
||||
Reference in new issue
Block a user