aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--smelt/glfw/smelt_internal.hpp3
-rw-r--r--smelt/glfw/sys_glfw.cpp5
-rw-r--r--smelt/sdl/sys_sdl.cpp3
3 files changed, 5 insertions, 6 deletions
diff --git a/smelt/glfw/smelt_internal.hpp b/smelt/glfw/smelt_internal.hpp
index 35251e2..9f51838 100644
--- a/smelt/glfw/smelt_internal.hpp
+++ b/smelt/glfw/smelt_internal.hpp
@@ -20,6 +20,7 @@
#include <cstdarg>
#include <dirent.h>
#include <unistd.h>
+#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#ifndef ENABLE_DUMB
@@ -186,12 +187,12 @@ public:
char logFile[256];
int limfps;
bool hideMouse,noSuspend;
- GLuint IndexBufferObject;
TOpenGLDevice *pOpenGLDevice;
smVertex *vertexArray;
smVertex *vertexBuf;
GLushort *indexBuf;
+ GLuint IndexBufferObject;
TRenderTargetList *targets;
TRenderTargetList *curTarget;
TTextureList *textures;
diff --git a/smelt/glfw/sys_glfw.cpp b/smelt/glfw/sys_glfw.cpp
index 663fdf4..6a35016 100644
--- a/smelt/glfw/sys_glfw.cpp
+++ b/smelt/glfw/sys_glfw.cpp
@@ -73,7 +73,7 @@ bool SMELT_IMPL::smInit()
else if(i==0x80000004)
memcpy(cpuName+32, CPUInfo, sizeof(CPUInfo));
}
- while(*cpuName=' ')++cpuName;
+ while(*cpuName==' ')++cpuName;
smLog("%s:" SLINE ": CPU: %s\n", SYS_GLFW_SRCFN,cpuName);
free(loced);
@@ -106,8 +106,7 @@ bool SMELT_IMPL::smInit()
return false;
}
GLFWmonitor *moninfo=glfwGetPrimaryMonitor();
- dispw=glfwGetVideoMode(moninfo)->width;
- disph=glfwGetVideoMode(moninfo)->height;
+ glfwGetMonitorPhysicalSize(moninfo,&dispw,&disph);
smLog("%s:" SLINE ": Screen: %d x %d\n",SYS_GLFW_SRCFN,dispw,disph);
glfwWindowHint(GLFW_RED_BITS,8);
glfwWindowHint(GLFW_GREEN_BITS,8);
diff --git a/smelt/sdl/sys_sdl.cpp b/smelt/sdl/sys_sdl.cpp
index 2c0ae93..beb07a0 100644
--- a/smelt/sdl/sys_sdl.cpp
+++ b/smelt/sdl/sys_sdl.cpp
@@ -62,7 +62,7 @@ bool SMELT_IMPL::smInit()
else if(i==0x80000004)
memcpy(cpuName+32, CPUInfo, sizeof(CPUInfo));
}
- while(*cpuName=' ')++cpuName;
+ while(*cpuName==' ')++cpuName;
smLog("%s:" SLINE ": CPU: %s\n", SYS_SDL_SRCFN,cpuName);
free(loced);
@@ -132,7 +132,6 @@ bool SMELT_IMPL::smInit()
if(!pSM->Active)pSM->focusChange(true);
}
SDL_ShowCursor(hideMouse?SDL_DISABLE:SDL_ENABLE);
- SDL_EnableScreenSaver();
initInput();
if(!initOGL()){smFinale();return false;}
if(!initOAL()){smFinale();return false;}