From b83fb431fdff9329dc3cf9457f1934b6156eedfa Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 1 May 2020 01:29:23 +0800 Subject: Make the new argument for smVidMode actually work. --- smelt/glfw/sys_glfw.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'smelt/glfw/sys_glfw.cpp') diff --git a/smelt/glfw/sys_glfw.cpp b/smelt/glfw/sys_glfw.cpp index bca71c9..f06ae5c 100644 --- a/smelt/glfw/sys_glfw.cpp +++ b/smelt/glfw/sys_glfw.cpp @@ -138,6 +138,8 @@ bool SMELT_IMPL::smInit() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR,3); glfwWindowHint(GLFW_OPENGL_PROFILE,GLFW_OPENGL_CORE_PROFILE); #endif + if(!showwindow) + glfwWindowHint(GLFW_VISIBLE,GLFW_FALSE); GLFWwindow *screen=glfwCreateWindow(windowed?scrw:dispw,windowed?scrh:disph,winTitle,NULL,NULL); hwnd=(void*)screen; if(!hwnd) @@ -218,7 +220,7 @@ void SMELT_IMPL::smQuitFunc(smHandler* h){quitHandler=h;} void SMELT_IMPL::smWinTitle(const char *title){strcpy(winTitle,title);} bool SMELT_IMPL::smIsActive(){return Active;} void SMELT_IMPL::smNoSuspend(bool para){noSuspend=para;} -void SMELT_IMPL::smVidMode(int resX,int resY,bool _windowed,bool showWindow) +void SMELT_IMPL::smVidMode(int resX,int resY,bool _windowed,bool _showWindow) { if(vertexArray)return; if(!pOpenGLDevice) @@ -226,8 +228,7 @@ void SMELT_IMPL::smVidMode(int resX,int resY,bool _windowed,bool showWindow) scrw=resX; scrh=resY; windowed=_windowed; - if(!showWindow) - glfwWindowHint(GLFW_VISIBLE,GLFW_FALSE); + showwindow=_showWindow; } else if(windowed!=_windowed) { -- cgit v1.2.3