use global preprocessor constant WITH_SDL instead of SDLDC
[enigma2.git] / main / enigma.cpp
index 933b20f8a1bb38ac400d6ad1fd34bac9699402e0..92b24b631ef7013b835d3b4d129ed89b7656f415 100644 (file)
@@ -1,7 +1,3 @@
-#ifdef WITH_SDL
-#define SDLDC
-#endif
-
 #include <stdio.h>
 #include <unistd.h>
 #include <libsig_comp.h>
@@ -20,7 +16,7 @@
 #include <lib/gdi/sdl.h>
 #endif
 #include <lib/gdi/epng.h>
-#include <lib/gdi/font.h> 
+#include <lib/gdi/font.h>
 #include <lib/gui/ebutton.h>
 #include <lib/gui/elabel.h>
 #include <lib/gui/elistboxcontent.h>
@@ -30,7 +26,7 @@
 #include <lib/python/connections.h>
 #include <lib/python/python.h>
 
-#include "bsod.h" 
+#include "bsod.h"
 
 #ifdef HAVE_GSTREAMER
 #include <gst/gst.h>
@@ -150,7 +146,7 @@ int main(int argc, char **argv)
        eMain main;
 
 #if 1
-#ifdef SDLDC
+#ifdef WITH_SDL
        ePtr<gSDLDC> my_dc;
        gSDLDC::getInstance(my_dc);
 #else
@@ -246,7 +242,10 @@ int main(int argc, char **argv)
        python.execute("mytest", "__main__");
        
        if (exit_code == 5) /* python crash */
+       {
+               eDebug("(exit code 5)");
                bsodFatal();
+       }
        
        dsk.paint();
        dsk_lcd.paint();
@@ -255,7 +254,6 @@ int main(int argc, char **argv)
                gPainter p(my_lcd_dc);
                p.resetClip(eRect(0, 0, 132, 64));
                p.clear();
-               p.flush();
        }
 
        return exit_code;
@@ -281,3 +279,16 @@ void quitMainloop(int exitCode)
        exit_code = exitCode;
        eApp->quit(0);
 }
+
+#include "version.h"
+
+const char *getEnigmaVersionString()
+{
+       return 
+#ifdef ENIGMA2_CHECKOUT_TAG
+               ENIGMA2_CHECKOUT_TAG
+#else
+               "HEAD"
+#endif
+                       "-" __DATE__;
+}