diff options
author | george82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2005-03-20 09:50:09 +0000 |
---|---|---|
committer | george82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2005-03-20 09:50:09 +0000 |
commit | 34be1fa75fcc20d00f7d49243ad4ccf957006895 (patch) | |
tree | 5ef58ce4ec038ede9951b78a969f0abadd1dc4ad /rfbplayer | |
parent | 9a7f991ccf1722c09704736403c15a896621d14d (diff) | |
download | tigervnc-34be1fa75fcc20d00f7d49243ad4ccf957006895.tar.gz tigervnc-34be1fa75fcc20d00f7d49243ad4ccf957006895.zip |
Added new property autoDetectPF to PlayerOptions class.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@257 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'rfbplayer')
-rw-r--r-- | rfbplayer/PlayerOptions.cxx | 7 | ||||
-rw-r--r-- | rfbplayer/PlayerOptions.h | 10 |
2 files changed, 9 insertions, 8 deletions
diff --git a/rfbplayer/PlayerOptions.cxx b/rfbplayer/PlayerOptions.cxx index 04c57847..394b2b15 100644 --- a/rfbplayer/PlayerOptions.cxx +++ b/rfbplayer/PlayerOptions.cxx @@ -33,7 +33,8 @@ void PlayerOptions::readFromRegistry() { RegKey regKey; regKey.createKey(HKEY_CURRENT_USER, _T("Software\\TightVnc\\RfbPlayer")); autoPlay = regKey.getBool(_T("AutoPlay"), DEFAULT_AUTOPLAY); - pixelFormatIndex = regKey.getInt(_T("PixelFormatIndex"), DEFAULT_PF); + autoDetectPF = regKey.getBool(_T("AutoDetectPixelFormat"), DEFAULT_AUTOPF); + pixelFormatIndex = regKey.getInt(_T("PixelFormatIndex"), DEFAULT_PF_INDEX); regKey.getBinary(_T("PixelFormat"), (void**)&pPF, &pfSize, &PixelFormat(32,24,0,1,255,255,255,16,8,0), sizeof(PixelFormat)); setPF(pPF); @@ -54,6 +55,7 @@ void PlayerOptions::writeToRegistry() { RegKey regKey; regKey.createKey(HKEY_CURRENT_USER, _T("Software\\TightVnc\\RfbPlayer")); regKey.setBool(_T("AutoPlay"), autoPlay); + regKey.setBool(_T("AutoDetectPixelFormat"), autoDetectPF); regKey.setInt(_T("PixelFormatIndex"), pixelFormatIndex); regKey.setBinary(_T("PixelFormat"), &pixelFormat, sizeof(PixelFormat)); regKey.setBool(_T("AcceptBell"), acceptBell); @@ -70,7 +72,8 @@ void PlayerOptions::writeToRegistry() { void PlayerOptions::writeDefaults() { initTime = DEFAULT_INIT_TIME; playbackSpeed = DEFAULT_SPEED; - pixelFormatIndex = PF_AUTO; + autoDetectPF = DEFAULT_AUTOPF; + pixelFormatIndex = DEFAULT_PF_INDEX; pixelFormat = PixelFormat(32,24,0,1,255,255,255,16,8,0); frameScale = DEFAULT_FRAME_SCALE; autoPlay = DEFAULT_AUTOPLAY; diff --git a/rfbplayer/PlayerOptions.h b/rfbplayer/PlayerOptions.h index 1bca3438..a64e3e74 100644 --- a/rfbplayer/PlayerOptions.h +++ b/rfbplayer/PlayerOptions.h @@ -27,11 +27,6 @@ #include <rfb_win32/registry.h> -// Supported pixel formats -#define PF_AUTO 0 -#define PF_D8_RGB332 1 -#define PF_D16_RGB655 2 -#define PF_D24_RGB888 3 #define PF_MODES 3 // The R, G and B values order in the pixel @@ -43,7 +38,9 @@ #define BRG_ORDER 5 // Default options values -#define DEFAULT_PF PF_AUTO +//#define DEFAULT_PF 0 +#define DEFAULT_PF_INDEX 0 +#define DEFAULT_AUTOPF TRUE #define DEFAULT_INIT_TIME -1 #define DEFAULT_SPEED 1.0 #define DEFAULT_FRAME_SCALE 100 @@ -69,6 +66,7 @@ public: double playbackSpeed; bool autoPlay; bool fullScreen; + bool autoDetectPF; long pixelFormatIndex; PixelFormat pixelFormat; bool acceptBell; |