summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recordmydesktop/src/rmd.c10
-rw-r--r--recordmydesktop/src/rmd_initialize_data.c1
-rw-r--r--recordmydesktop/src/rmd_parseargs.c4
-rw-r--r--recordmydesktop/src/rmd_types.h1
4 files changed, 10 insertions, 6 deletions
diff --git a/recordmydesktop/src/rmd.c b/recordmydesktop/src/rmd.c
index bb513a2..98b3862 100644
--- a/recordmydesktop/src/rmd.c
+++ b/recordmydesktop/src/rmd.c
@@ -28,15 +28,16 @@
#include "rmd_types.h"
+#include "rmd_cache.h"
#include "rmd_encode_cache.h"
+#include "rmd_error.h"
#include "rmd_initialize_data.h"
#include "rmd_parseargs.h"
#include "rmd_queryextensions.h"
-#include "rmd_cache.h"
-#include "rmd_error.h"
-#include "rmd_threads.h"
+#include "rmd_rescue.h"
#include "rmd_setbrwindow.h"
#include "rmd_shortcuts.h"
+#include "rmd_threads.h"
#include "rmd_wm_check.h"
@@ -49,6 +50,9 @@ int main(int argc,char **argv){
if (!ParseArgs(argc, argv, &pdata.args)) {
exit(1);
}
+ if (pdata.args.rescue_path != NULL) {
+ exit(rmdRescue(pdata.args.rescue_path));
+ }
if(XInitThreads ()==0){
fprintf(stderr,"Couldn't initialize thread support!\n");
exit(7);
diff --git a/recordmydesktop/src/rmd_initialize_data.c b/recordmydesktop/src/rmd_initialize_data.c
index 631e725..5ec8bc3 100644
--- a/recordmydesktop/src/rmd_initialize_data.c
+++ b/recordmydesktop/src/rmd_initialize_data.c
@@ -199,6 +199,7 @@ void SetupDefaultArgs(ProgArgs *args) {
args->y = 0;
args->width = 0;
args->height = 0;
+ args->rescue_path = NULL;
args->nosound = 0;
args->full_shots = 0;
args->follow_mouse = 0;
diff --git a/recordmydesktop/src/rmd_parseargs.c b/recordmydesktop/src/rmd_parseargs.c
index 4fa1eac..ab1f4f7 100644
--- a/recordmydesktop/src/rmd_parseargs.c
+++ b/recordmydesktop/src/rmd_parseargs.c
@@ -29,7 +29,6 @@
#include "rmd_types.h"
#include "rmd_macro.h"
-#include "rmd_rescue.h"
static void PrintConfig(void) {
@@ -524,8 +523,7 @@ boolean ParseArgs(int argc, char **argv, ProgArgs *arg_return) {
}
else if(!strcmp(argv[i],"-rescue")){
if(i+1<argc){
- int ex_st=rmdRescue(argv[i+1]);
- exit(ex_st);
+ arg_return->rescue_path = argv[i + 1];
}
else{
fprintf(stderr,"Argument Usage: -rescue path_to_data\n");
diff --git a/recordmydesktop/src/rmd_types.h b/recordmydesktop/src/rmd_types.h
index 4cd9548..c93b8b7 100644
--- a/recordmydesktop/src/rmd_types.h
+++ b/recordmydesktop/src/rmd_types.h
@@ -129,6 +129,7 @@ typedef struct _ProgArgs{
#else
u_int32_t buffsize;
#endif
+ const char* rescue_path;
int nosound; //do not record sound(default 0)
int noshared; //do not use shared memory extension(default 0)
int nowmcheck; //do not check if there's a 3d comp window manager
© All Rights Reserved