aboutsummaryrefslogtreecommitdiff
path: root/smelt
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
parent87a25aa8fd3cb5a67747bff63711338e0f88b7c3 (diff)
downloadSMELT-master.tar.xz
Make the new argument for smVidMode actually work.HEADmaster
Diffstat (limited to 'smelt')
-rw-r--r--smelt/glfw/smelt_internal.hpp4
-rw-r--r--smelt/glfw/sys_glfw.cpp7
2 files changed, 6 insertions, 5 deletions
diff --git a/smelt/glfw/smelt_internal.hpp b/smelt/glfw/smelt_internal.hpp
index 5b8d5db..63cd190 100644
--- a/smelt/glfw/smelt_internal.hpp
+++ b/smelt/glfw/smelt_internal.hpp
@@ -101,7 +101,7 @@ public:
virtual void smWinTitle(const char* title);
virtual bool smIsActive();
virtual void smNoSuspend(bool para);
- virtual void smVidMode(int resX,int resY,bool _windowed,bool showWindow=true);
+ virtual void smVidMode(int resX, int resY, bool _windowed, bool _showWindow=true);
virtual void smLogFile(const char* path);
virtual void smLog(const char* format,...);
virtual void smScreenShot(const char* path);
@@ -194,7 +194,7 @@ private:
char winTitle[256];
int scrw,scrh;
int dispw,disph;
- bool windowed,vsync;
+ bool windowed,vsync,showwindow;
char logFile[256];
int limfps;
bool hideMouse,noSuspend;
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)
{