aboutsummaryrefslogtreecommitdiffstats
path: root/rfbplayer
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-04-13 12:56:15 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-04-13 12:56:15 +0000
commitee455792bcba39157bab83f3ee617b7f6da4a7d2 (patch)
treeea38eb8777f6010ff38defedcd4fe3f51a91574f /rfbplayer
parent26af76586ace1dd4c85d0e2155cf3c8c7c124213 (diff)
downloadtigervnc-ee455792bcba39157bab83f3ee617b7f6da4a7d2.tar.gz
tigervnc-ee455792bcba39157bab83f3ee617b7f6da4a7d2.zip
Added the command-line parameter "-loop".
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@287 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'rfbplayer')
-rw-r--r--rfbplayer/PlayerOptions.cxx2
-rw-r--r--rfbplayer/rfbplayer.cxx15
-rw-r--r--rfbplayer/rfbplayer.h1
3 files changed, 15 insertions, 3 deletions
diff --git a/rfbplayer/PlayerOptions.cxx b/rfbplayer/PlayerOptions.cxx
index 8bf8ff24..4494e264 100644
--- a/rfbplayer/PlayerOptions.cxx
+++ b/rfbplayer/PlayerOptions.cxx
@@ -42,7 +42,6 @@ void PlayerOptions::readFromRegistry() {
acceptBell = regKey.getBool(_T("AcceptBell"), DEFAULT_ACCEPT_BELL);
acceptCutText = regKey.getBool(_T("AcceptCutText"), DEFAULT_ACCEPT_CUT_TEXT);
autoPlay = regKey.getBool(_T("AutoPlay"), DEFAULT_AUTOPLAY);
- loopPlayback = regKey.getBool(_T("LoopPlayback"), DEFAULT_LOOP_PLAYBACK);
askPixelFormat = regKey.getBool(_T("AskPixelFormat"), DEFAULT_ASK_PF);
if (pPF) delete pPF;
} catch (rdr::Exception e) {
@@ -62,7 +61,6 @@ void PlayerOptions::writeToRegistry() {
regKey.setBool(_T("AcceptBell"), acceptBell);
regKey.setBool(_T("AcceptCutText"), acceptCutText);
regKey.setBool(_T("AutoPlay"), autoPlay);
- regKey.setBool(_T("LoopPlayback"), loopPlayback);
regKey.setBool(_T("AskPixelFormat"), askPixelFormat);
} catch (rdr::Exception e) {
MessageBox(0, e.str(), e.type(), MB_OK | MB_ICONERROR);
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index 552da3de..87f48864 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -64,7 +64,8 @@ char usage_msg[] =
" \t is double speed, 0.5 is half speed. Default: 1.0.\r\n"
" -pos <ms> \t- Sets initial time position in the session file,\r\n"
" \t in milliseconds. Default: 0.\r\n"
- " -autoplay \t- Runs the player in the playback mode.\r\n";
+ " -autoplay \t- Runs the player in the playback mode.\r\n"
+ " -loop \t- Replays the rfb session.";
// -=- RfbPlayer's defines
@@ -276,6 +277,7 @@ RfbPlayer::RfbPlayer(char *_fileName, PlayerOptions *_options)
disableTBandMenuItems();
setTitle("None");
}
+ init();
}
RfbPlayer::~RfbPlayer() {
@@ -1071,6 +1073,11 @@ long RfbPlayer::calculateSessionTime(char *filename) {
return 0;
}
+void RfbPlayer::init() {
+ if (options.loopPlayback) CheckMenuItem(hMenu, ID_LOOP, MF_CHECKED);
+ else CheckMenuItem(hMenu, ID_LOOP, MF_UNCHECKED);
+}
+
void RfbPlayer::closeSessionFile() {
char speedStr[10];
DWORD dwStyle;
@@ -1367,6 +1374,12 @@ bool processParams(int argc, char* argv[]) {
continue;
}
+ if ((strcasecmp(argv[i], "-loop") == 0) ||
+ (strcasecmp(argv[i], "/loop") == 0) && (i < argc-1)) {
+ playerOptions.loopPlayback = true;
+ continue;
+ }
+
if (i != argc - 1)
return false;
}
diff --git a/rfbplayer/rfbplayer.h b/rfbplayer/rfbplayer.h
index ec4eef04..e1c0b3d5 100644
--- a/rfbplayer/rfbplayer.h
+++ b/rfbplayer/rfbplayer.h
@@ -59,6 +59,7 @@ class RfbPlayer : public RfbProto {
void calculateScrollBars();
void close(const char* reason=0);
void updatePos(long pos);
+ void init();
// -=- Coordinate conversions