windows
This commit is contained in:
parent
712c063c42
commit
1cb8467874
1 changed files with 8 additions and 0 deletions
|
|
@ -6,6 +6,10 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
#include <Mw/Widget/OpenGL.h>
|
#include <Mw/Widget/OpenGL.h>
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
#include <signal.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static MwWidget window, opengl;
|
static MwWidget window, opengl;
|
||||||
static GSEngine engine;
|
static GSEngine engine;
|
||||||
|
|
||||||
|
|
@ -50,9 +54,11 @@ static void after_render(GSEngine self){
|
||||||
rot[0] = rot[1] = rot[2] += (1.0 / GSEngineGetTPS(self)) * 90;
|
rot[0] = rot[1] = rot[2] += (1.0 / GSEngineGetTPS(self)) * 90;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
static void shutdown_engine(int sig){
|
static void shutdown_engine(int sig){
|
||||||
GSEngineShutdown(engine);
|
GSEngineShutdown(engine);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char** argv){
|
int main(int argc, char** argv){
|
||||||
GSEngineParam param;
|
GSEngineParam param;
|
||||||
|
|
@ -71,8 +77,10 @@ int main(int argc, char** argv){
|
||||||
if((engine = GSEngineCreate(¶m)) != NULL){
|
if((engine = GSEngineCreate(¶m)) != NULL){
|
||||||
GSSound sound;
|
GSSound sound;
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
signal(SIGINT, shutdown_engine);
|
signal(SIGINT, shutdown_engine);
|
||||||
signal(SIGTERM, shutdown_engine);
|
signal(SIGTERM, shutdown_engine);
|
||||||
|
#endif
|
||||||
|
|
||||||
model = GSModelOpen(engine, "game:/mdl/fish.gsm");
|
model = GSModelOpen(engine, "game:/mdl/fish.gsm");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue