diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-11-03 07:13:24 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-11-03 07:13:24 +0000 |
commit | 27bbb3232b48ca03312ae455b38f0aa1a1849000 (patch) | |
tree | 625fd3c2c93392ad07ea0626d2b3d397a4338dbc /rMD-exp/src/recordmydesktop.c | |
parent | a897a69ee03e5aeabbf3e9ecd3dca9a0b7596166 (diff) |
utilized window manager check,
added option to disable checking,
renamed --nosound option to --no-sound
updated man page acoording to the above changes
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@139 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'rMD-exp/src/recordmydesktop.c')
-rw-r--r-- | rMD-exp/src/recordmydesktop.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/rMD-exp/src/recordmydesktop.c b/rMD-exp/src/recordmydesktop.c index 648780d..2550ee0 100644 --- a/rMD-exp/src/recordmydesktop.c +++ b/rMD-exp/src/recordmydesktop.c @@ -72,13 +72,32 @@ int main(int argc,char **argv){ if(SetBRWindow(pdata.dpy,&pdata.brwin,&pdata.specs,&pdata.args)) exit(11); + + //check if we are under compiz or beryl,in which case we must enable full-shots + //and with it use of shared memory.User can override this + pdata.window_manager=((pdata.args.nowmcheck)?NULL:rmdWMCheck(pdata.dpy,pdata.specs.root)); + if(pdata.window_manager==NULL){ + fprintf(stderr,"Not taking window manager into account.\n"); + } + //Right now only wm's that I know of performing 3d compositing are beryl and compiz. + //No, the blue screen in metacity doesn't count :) + else if(!strcmp(pdata.window_manager,"compiz") || !strcmp(pdata.window_manager,"beryl")){ + fprintf(stderr,"\nDetected 3d compositing window manager.\n" + "Reverting to full screen capture at every frame.\n" + "To disable this check run with --no-wm-check\n" + "(though that is not advised, since it will probably produce faulty results).\n\n"); + pdata.args.full_shots=1; + pdata.args.noshared=0; + pdata.args.nocondshared=1; + } + QueryExtensions(pdata.dpy,&pdata.args,&pdata.damage_event, &pdata.damage_error); - pdata.window_manager=rmdWMCheck(pdata.dpy,pdata.specs.root); - //init data + //init data + //these are globals, look for them at the header frames_total=frames_lost=encoder_busy=capture_busy=0; @@ -136,7 +155,7 @@ int main(int argc,char **argv){ if(!pdata.args.nosound){ pdata.sound_handle=OpenDev(pdata.args.device,&pdata.args.channels,&pdata.args.frequency,&pdata.periodsize, &pdata.periodtime,&pdata.hard_pause); if(pdata.sound_handle==NULL){ - fprintf(stderr,"Error while opening/configuring soundcard %s\nTry running with the --nosound or specify a correct device.\n",pdata.args.device); + fprintf(stderr,"Error while opening/configuring soundcard %s\nTry running with the --no-sound or specify a correct device.\n",pdata.args.device); exit(3); } } |