Changeset 50406 in vbox
- Timestamp:
- Feb 10, 2014 8:35:11 PM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r47252 r50406 534 534 { 535 535 const char *pszEnvTemp; 536 536 /** @todo r=bird: This isn't up to scratch. The life time of an RTEnvGet 537 * return value is only up to the next RTEnv*, *getenv, *putenv, 538 * setenv call in _any_ process in the system and the it has known and 539 * documented code page issues. 540 * 541 * Use RTEnvGetEx instead! */ 537 542 if ((pszEnvTemp = RTEnvGet("VBOX_CAPTUREWIDTH")) != 0) 538 543 { … … 650 655 unsigned fCSAM = ~0U; 651 656 #ifdef VBOX_WITH_VIDEO_REC 652 unsigned fVIDEOREC= 0;657 bool fVideoRec = 0; 653 658 unsigned long ulFrameWidth = 800; 654 659 unsigned long ulFrameHeight = 600; 655 unsigned long ulBitRate = 300000; 656 char pszMPEGFile[RTPATH_MAX];660 unsigned long ulBitRate = 300000; /** @todo r=bird: The COM type ULONG isn't unsigned long, it's 32-bit unsigned int. */ 661 char szMpegFile[RTPATH_MAX]; 657 662 const char *pszFileNameParam = "VBox-%d.vob"; 658 663 #endif /* VBOX_WITH_VIDEO_REC */ 659 664 660 LogFlow 661 RTPrintf 662 663 665 LogFlow(("VBoxHeadless STARTED.\n")); 666 RTPrintf(VBOX_PRODUCT " Headless Interface " VBOX_VERSION_STRING "\n" 667 "(C) 2008-" VBOX_C_YEAR " " VBOX_VENDOR "\n" 668 "All rights reserved.\n\n"); 664 669 665 670 #ifdef VBOX_WITH_VIDEO_REC … … 792 797 #ifdef VBOX_WITH_VIDEO_REC 793 798 case 'c': 794 fV IDEOREC= true;799 fVideoRec = true; 795 800 break; 796 801 case 'w': … … 856 861 return 1; 857 862 } 858 RTStrPrintf(& pszMPEGFile[0], RTPATH_MAX, pszFileNameParam, RTProcSelf());863 RTStrPrintf(&szMpegFile[0], RTPATH_MAX, pszFileNameParam, RTProcSelf()); 859 864 #endif /* defined VBOX_WITH_VIDEO_REC */ 860 865 … … 971 976 PFNREGISTERVIDEORECFB pfnRegisterVideoRecFB; 972 977 973 if (fV IDEOREC)978 if (fVideoRec) 974 979 { 975 980 HRESULT rcc = S_OK; … … 995 1000 Log2(("VBoxHeadless: calling pfnRegisterVideoRecFB\n")); 996 1001 rcc = pfnRegisterVideoRecFB(ulFrameWidth, ulFrameHeight, ulBitRate, 997 pszMPEGFile, &pFramebuffer);1002 szMpegFile, &pFramebuffer); 998 1003 if (rcc != S_OK) 999 1004 LogError("Failed to initialise video capturing - make sure that the file format\n" … … 1021 1026 { 1022 1027 # ifdef VBOX_WITH_VIDEO_REC 1023 if (fV IDEOREC&& uScreenId == 0)1028 if (fVideoRec && uScreenId == 0) 1024 1029 { 1025 1030 /* Already registered. */ -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r46658 r50406 168 168 #ifdef RT_OS_WINDOWS 169 169 /* default to DirectX if nothing else set */ 170 if (!RTEnv Get("SDL_VIDEODRIVER"))170 if (!RTEnvExist("SDL_VIDEODRIVER")) 171 171 { 172 172 _putenv("SDL_VIDEODRIVER=directx"); -
trunk/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTest.cpp
r44529 r50406 32 32 bool RTCALL VBoxOglIs3DAccelerationSupported() 33 33 { 34 if (RTEnv Get("VBOX_CROGL_FORCE_SUPPORTED"))34 if (RTEnvExist("VBOX_CROGL_FORCE_SUPPORTED")) 35 35 { 36 36 LogRel(("VBOX_CROGL_FORCE_SUPPORTED is specified, skipping 3D test, and treating as supported\n")); -
trunk/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
r44529 r50406 32 32 bool RTCALL VBoxOglIs3DAccelerationSupported() 33 33 { 34 if (RTEnv Get("VBOX_CROGL_FORCE_SUPPORTED"))34 if (RTEnvExist("VBOX_CROGL_FORCE_SUPPORTED")) 35 35 { 36 36 LogRel(("VBOX_CROGL_FORCE_SUPPORTED is specified, skipping 3D test, and treating as supported\n")); -
trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp
r48694 r50406 177 177 for (unsigned i = 0; i < RT_ELEMENTS(s_aProps); i++) 178 178 { 179 const char *pszEnvValue = RTEnvGet(s_aProps[i].pszEnvName); 180 if (pszEnvValue) 179 char szEnvValue[8192]; 180 int rcEnv = RTEnvGetEx(RTENV_DEFAULT, s_aProps[i].pszEnvName, szEnvValue, sizeof(szEnvValue), NULL); 181 if (RT_SUCCESS(rc)) 181 182 { 182 rc = RTDbgCfgChangeString(pUVM->dbgf.s.hDbgCfg, s_aProps[i].enmProp, RTDBGCFGOP_PREPEND, pszEnvValue);183 rc = RTDbgCfgChangeString(pUVM->dbgf.s.hDbgCfg, s_aProps[i].enmProp, RTDBGCFGOP_PREPEND, szEnvValue); 183 184 if (RT_FAILURE(rc)) 184 185 return VMR3SetError(pUVM, rc, RT_SRC_POS, 185 "DBGF Config Error: %s=%s -> %Rrc", s_aProps[i].pszEnvName, pszEnvValue, rc);186 "DBGF Config Error: %s=%s -> %Rrc", s_aProps[i].pszEnvName, szEnvValue, rc); 186 187 } 188 else if (rc != VERR_ENV_VAR_NOT_FOUND) 189 return VMR3SetError(pUVM, rc, RT_SRC_POS, 190 "DBGF Config Error: Error querying env.var. %s: %Rrc", s_aProps[i].pszEnvName, rc); 187 191 188 192 char *pszCfgValue;
Note:
See TracChangeset
for help on using the changeset viewer.