*/}}
Browse Source

adapt to windows

YimingWu 8 months ago
parent
commit
fbeaa8b99f
2 changed files with 5 additions and 0 deletions
  1. 4 0
      la_kernel.c
  2. 1 0
      la_tns_kernel.c

+ 4 - 0
la_kernel.c

@@ -381,6 +381,7 @@ void la_DestroySystemWindowWin32(laWindow* w) {
 };
 #endif
 
+#ifdef __linux__
 void la_HandlerSIGSEGV(int sig) {
     void *array[30];
     size_t sz;
@@ -390,6 +391,7 @@ void la_HandlerSIGSEGV(int sig) {
     backtrace_symbols_fd(array, sz, STDERR_FILENO);
     exit(1);
 }
+#endif
 
 void la_glDebugOutput(GLenum source, GLenum type, unsigned int id,
     GLenum severity, GLsizei length, const char* message, const void* userParam) {
@@ -817,7 +819,9 @@ void laProcessInitArguments(int argc, char* argv[],laInitArguments* ia) {
     }
 }
 int laGetReadyWith(laInitArguments* ia){
+#ifdef __linux__
     signal(SIGSEGV,la_HandlerSIGSEGV);
+#endif
 
     memcpy(&MAIN.InitArgs,ia,sizeof(laInitArguments));
     if(MAIN.InitArgs.GLMajor>4||MAIN.InitArgs.GLMajor<1){ MAIN.InitArgs.GLMajor=3; }

+ 1 - 0
la_tns_kernel.c

@@ -866,6 +866,7 @@ void tnsClearTranslation44d(tnsMatrix44d mat){
     mat[11] = 0;
 }
 
+void tnsCopyMatrix44d(tnsMatrix44d from, tnsMatrix44d to);
 void tnsExtractXYZEuler44d(tnsMatrix44d _mat, real *xyz_result){
     real xRot, yRot, zRot;
     tnsMatrix44d mat; tnsCopyMatrix44d(_mat,mat);