From 6e47cbb9d80dc94751127502bb0786bfcfcc35db Mon Sep 17 00:00:00 2001 From: enselic Date: Fri, 12 Sep 2008 20:59:43 +0000 Subject: src/recordmydesktop.c: Expand the unnecessary QUERY_DISPLAY_SPECS()-macro. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@510 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/recordmydesktop.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/recordmydesktop/src/recordmydesktop.c b/recordmydesktop/src/recordmydesktop.c index c919690..859477a 100644 --- a/recordmydesktop/src/recordmydesktop.c +++ b/recordmydesktop/src/recordmydesktop.c @@ -28,19 +28,6 @@ #include -#define QUERY_DISPLAY_SPECS(display,specstruct){\ - (specstruct)->screen=DefaultScreen(display);\ - (specstruct)->width=DisplayWidth(display,(specstruct)->screen);\ - (specstruct)->height=DisplayHeight(display,(specstruct)->screen);\ - (specstruct)->root=RootWindow(display,(specstruct)->screen);\ - (specstruct)->visual=DefaultVisual(display,(specstruct)->screen);\ - (specstruct)->gc=DefaultGC(display,(specstruct)->screen);\ - (specstruct)->depth=DefaultDepth(display,(specstruct)->screen);\ - (specstruct)->bpixel=XBlackPixel(display,(specstruct)->screen);\ - (specstruct)->wpixel=XWhitePixel(display,(specstruct)->screen);\ -} - - int main(int argc,char **argv){ ProgData pdata; @@ -73,7 +60,18 @@ int main(int argc,char **argv){ JackData jdata; pdata.jdata=&jdata; #endif - QUERY_DISPLAY_SPECS(pdata.dpy,&pdata.specs); + + // Query display specs + pdata.specs.screen = DefaultScreen(pdata.dpy); + pdata.specs.width = DisplayWidth(pdata.dpy, pdata.specs.screen); + pdata.specs.height = DisplayHeight(pdata.dpy, pdata.specs.screen); + pdata.specs.root = RootWindow(pdata.dpy, pdata.specs.screen); + pdata.specs.visual = DefaultVisual(pdata.dpy, pdata.specs.screen); + pdata.specs.gc = DefaultGC(pdata.dpy, pdata.specs.screen); + pdata.specs.depth = DefaultDepth(pdata.dpy, pdata.specs.screen); + pdata.specs.bpixel = XBlackPixel(pdata.dpy, pdata.specs.screen); + pdata.specs.wpixel = XWhitePixel(pdata.dpy, pdata.specs.screen); + if((pdata.specs.depth!=32)&& (pdata.specs.depth!=24)&& (pdata.specs.depth!=16)){ -- cgit v1.2.3