Flag windowed application when attempting window creation using 3D driver

This commit is contained in:
kaetemi 2015-03-06 21:15:09 +01:00
parent 4afe23c6e3
commit 28a7017c00
2 changed files with 7 additions and 0 deletions

View file

@ -1327,6 +1327,10 @@ const D3DFORMAT FinalPixelFormat[ITexture::UploadFormatCount][CDriverD3D::FinalP
bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay) bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay)
{ {
H_AUTO_D3D(CDriver3D_setDisplay); H_AUTO_D3D(CDriver3D_setDisplay);
if (!mode.OffScreen)
NLMISC::INelContext::getInstance().setWindowedApplication(true);
if (!_D3D) if (!_D3D)
return false; return false;
#ifndef NL_NO_ASM #ifndef NL_NO_ASM

View file

@ -603,6 +603,9 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
{ {
H_AUTO_OGL(CDriverGL_setDisplay) H_AUTO_OGL(CDriverGL_setDisplay)
if (!mode.OffScreen)
NLMISC::INelContext::getInstance().setWindowedApplication(true);
_win = EmptyWindow; _win = EmptyWindow;
_CurrentMode = mode; _CurrentMode = mode;