removed clang-format and clang_complete files from the repo
[dosdemo] / src / glut / main.c
index abe25cc..a552832 100644 (file)
@@ -11,6 +11,7 @@
 #include "cfgopt.h"
 #include "cgmath/cgmath.h"
 #include "util.h"
+#include "cpuid.h"
 
 static void display(void);
 static void idle(void);
@@ -101,6 +102,9 @@ int main(int argc, char **argv)
        glEnable(GL_TEXTURE_2D);
        glEnable(GL_CULL_FACE);
 
+       if(read_cpuid(&cpuid) == 0) {
+               print_cpuid(&cpuid);
+       }
 
        if(!set_video_mode(match_video_mode(FB_WIDTH, FB_HEIGHT, FB_BPP), 1)) {
                return 1;
@@ -118,21 +122,26 @@ int main(int argc, char **argv)
        wgl_swap_interval_ext = wglGetProcAddress("wglSwapIntervalEXT");
 #endif
 
-       reshape(glutGet(GLUT_WINDOW_WIDTH), glutGet(GLUT_WINDOW_HEIGHT));
-
        if(au_init() == -1) {
                return 1;
        }
        time_msec = 0;
-       if(demo_init(argc, argv) == -1) {
+       if(demo_init1(argc, argv) == -1) {
                return 1;
        }
-       atexit(demo_cleanup);
 
        if(opt.fullscreen) {
                set_fullscreen(opt.fullscreen);
+               reshape(glutGet(GLUT_SCREEN_WIDTH), glutGet(GLUT_SCREEN_HEIGHT));
+       } else {
+               reshape(glutGet(GLUT_WINDOW_WIDTH), glutGet(GLUT_WINDOW_HEIGHT));
        }
 
+       if(demo_init2() == -1) {
+               return 1;
+       }
+       atexit(demo_cleanup);
+
        reset_timer();
 
        glutMainLoop();
@@ -144,6 +153,11 @@ void demo_quit(void)
        exit(0);
 }
 
+void demo_abort(void)
+{
+       abort();
+}
+
 struct video_mode *video_modes(void)
 {
        return vmodes;