common.h
branchtrunk
changeset 22 93aaf15c145a
parent 2 4c1f7b705009
child 23 3b14b8aacaa0
equal deleted inserted replaced
21:e47abd1f520f 22:93aaf15c145a
     1 /*
     1 /*
     2  * MP3/MPlayer plugin to VDR (C++)
     2  * MP3/MPlayer plugin to VDR (C++)
     3  *
     3  *
     4  * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
     4  * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or
     6  * This code is free software; you can redistribute it and/or
     7  * modify it under the terms of the GNU General Public License
     7  * modify it under the terms of the GNU General Public License
     8  * as published by the Free Software Foundation; either version 2
     8  * as published by the Free Software Foundation; either version 2
     9  * of the License, or (at your option) any later version.
     9  * of the License, or (at your option) any later version.
    29 #ifndef APIVERSNUM
    29 #ifndef APIVERSNUM
    30 #include <vdr/config.h>
    30 #include <vdr/config.h>
    31 #endif
    31 #endif
    32 #include "config.h"
    32 #include "config.h"
    33 
    33 
    34 #if APIVERSNUM >= 10313
       
    35 #define SLEEP(x) cCondWait::SleepMs(x)
    34 #define SLEEP(x) cCondWait::SleepMs(x)
    36 #else
       
    37 #define SLEEP(x) usleep((x)*1000)
       
    38 #endif
       
    39 
    35 
    40 #if APIVERSNUM >= 10318
       
    41 #include <vdr/tools.h>
    36 #include <vdr/tools.h>
    42 static cTimeMs __time;
    37 static cTimeMs __time;
    43 #define time_ms() ((int)__time.Elapsed())
    38 #define time_ms() ((int)__time.Elapsed())
    44 #endif
       
    45 
    39 
    46 #if APIVERSNUM >= 10338
       
    47 #define BUTTON "Button$"
    40 #define BUTTON "Button$"
    48 #else
       
    49 #define BUTTON
       
    50 #endif
       
    51 
    41 
    52 #if !defined(NO_DEBUG) && defined(DEBUG)
    42 #if !defined(NO_DEBUG) && defined(DEBUG)
    53 #define d(x) { (x); }
    43 #define d(x) { (x); }
    54 #else
    44 #else
    55 #define d(x) ; 
    45 #define d(x) ;