aboutsummaryrefslogtreecommitdiff
path: root/smelt/glfw/sys_glfw.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-01 01:29:23 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-05-01 01:29:23 +0800
commitb83fb431fdff9329dc3cf9457f1934b6156eedfa (patch)
treeb78a8ec2aacaaf8b1e87c9bc19e056cfe5937eee /smelt/glfw/sys_glfw.cpp
parent87a25aa8fd3cb5a67747bff63711338e0f88b7c3 (diff)
downloadSMELT-master.tar.xz
Make the new argument for smVidMode actually work.HEADmaster
Diffstat (limited to 'smelt/glfw/sys_glfw.cpp')
-rw-r--r--smelt/glfw/sys_glfw.cpp7
1 files changed, 4 insertions, 3 deletions
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)
{