]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Sleep timer
authorChris Tallon <chris@vomp.tv>
Sun, 28 Sep 2008 15:58:26 +0000 (15:58 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 28 Sep 2008 15:58:26 +0000 (15:58 +0000)
winmain.cc

index efa87d2efb53c0e46d6fc43f0d2d2f829f682548..befa19069fe3f7204419561e3d4d0d37cbbe8fd7 100644 (file)
@@ -42,6 +42,7 @@
 #include "boxstack.h"
 #include "command.h"
 #include "wol.h"
+#include "vsleeptimer.h"
 
 void sighandler(int signalReceived);
 void shutdown(int code);
@@ -60,6 +61,8 @@ VDR* vdr;
 Video* video;
 Audio* audio;
 Wol* wol;
+Sleeptimer* sleeptimer;
+
 
 bool wnd_fullscreen=false;
 bool wnd_topmost=false;
@@ -150,8 +153,9 @@ INT WINAPI WinMain( HINSTANCE hinst , HINSTANCE previnst, LPSTR cmdline, int cmd
   boxstack   = new BoxStack();
   command    = new Command();
   wol        = new Wol();
+  sleeptimer = new Sleeptimer();
 
-  if (!logger || !remote || !mtd || !led || !osd || !video || !audio || !boxstack || !command)
+  if (!logger || !remote || !mtd || !led || !osd || !video || !audio || !boxstack || !command || !sleeptimer)
   {
     ERROR_MSG("Could not create objects. Memory problems?\n");
     shutdown(1);
@@ -878,6 +882,11 @@ void shutdown(int code)
     logger->shutdown();
     delete logger;
   }
+  if (sleeptimer)
+  {
+    delete sleeptimer;
+    logger->log("Core", Log::NOTICE, "Sleeptimer module shut down");
+  }
   ExitProcess(0);
 
 }