aboutsummaryrefslogtreecommitdiff
path: root/smelt
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-17 22:43:07 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-17 22:43:07 +0800
commit123771f6b50550d35ba3f6d7c87e240686c23703 (patch)
treecfaac5cc5195eb10f9e8a246e589f0e498a0475a /smelt
parent16a560a5e723c27e61f5bba945a089b7b926f4ae (diff)
downloadSMELT-123771f6b50550d35ba3f6d7c87e240686c23703.tar.xz
Fixed example application.
Fixed compile errors in Windows.
Diffstat (limited to 'smelt')
-rw-r--r--smelt/glfw/makefile2
-rw-r--r--smelt/glfw/sys_glfw.cpp5
-rw-r--r--smelt/sdl/makefile2
-rw-r--r--smelt/sdl/sys_sdl.cpp2
4 files changed, 6 insertions, 5 deletions
diff --git a/smelt/glfw/makefile b/smelt/glfw/makefile
index e325ff3..d487454 100644
--- a/smelt/glfw/makefile
+++ b/smelt/glfw/makefile
@@ -1,5 +1,5 @@
CC= g++
-CXXFLAGS= -c -g -O2 -std=c++11 -Wall -I../include -D_LINUX -fPIC
+CXXFLAGS= -c -g -O2 -std=c++11 -Wall -I../../include -D_LINUX -fPIC
TARGET= libsmelt.a
all: objects-normal archive-normal
diff --git a/smelt/glfw/sys_glfw.cpp b/smelt/glfw/sys_glfw.cpp
index 6a35016..2c8b2e9 100644
--- a/smelt/glfw/sys_glfw.cpp
+++ b/smelt/glfw/sys_glfw.cpp
@@ -62,7 +62,7 @@ bool SMELT_IMPL::smInit()
int CPUInfo[4]={-1};
__cpuid(CPUInfo,0x80000000);
unsigned int nExIds=CPUInfo[0];
- char *cpuName,*loced;cpuName=calloc(0x40,sizeof(char));loced=cpuName;
+ char *cpuName,*loced;cpuName=(char*)calloc(0x40,sizeof(char));loced=cpuName;
for(unsigned int i=0x80000000;i<=nExIds;++i)
{
__cpuid(CPUInfo, i);
@@ -106,7 +106,8 @@ bool SMELT_IMPL::smInit()
return false;
}
GLFWmonitor *moninfo=glfwGetPrimaryMonitor();
- glfwGetMonitorPhysicalSize(moninfo,&dispw,&disph);
+ dispw=glfwGetVideoMode(moninfo)->width;
+ disph=glfwGetVideoMode(moninfo)->height;
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/makefile b/smelt/sdl/makefile
index d58f077..f118481 100644
--- a/smelt/sdl/makefile
+++ b/smelt/sdl/makefile
@@ -1,5 +1,5 @@
CC= g++
-CXXFLAGS= -c -g -O2 -std=c++11 -Wall -I/usr/include/SDL/ -I../include -D_LINUX -fPIC
+CXXFLAGS= -c -g -O2 -std=c++11 -Wall -I/usr/include/SDL/ -I../../include -D_LINUX -fPIC
TARGET= libsmelt.a
all: objects-normal archive-normal
diff --git a/smelt/sdl/sys_sdl.cpp b/smelt/sdl/sys_sdl.cpp
index beb07a0..c0f64d0 100644
--- a/smelt/sdl/sys_sdl.cpp
+++ b/smelt/sdl/sys_sdl.cpp
@@ -51,7 +51,7 @@ bool SMELT_IMPL::smInit()
int CPUInfo[4]={-1};
__cpuid(CPUInfo,0x80000000);
unsigned int nExIds=CPUInfo[0];
- char *cpuName,*loced;cpuName=calloc(0x40,sizeof(char));loced=cpuName;
+ char *cpuName,*loced;cpuName=(char*)calloc(0x40,sizeof(char));loced=cpuName;
for(unsigned int i=0x80000000;i<=nExIds;++i)
{
__cpuid(CPUInfo, i);