Changeset 25771 in vbox for trunk/src/VBox/Frontends/VBoxBFE
- Timestamp:
- Jan 12, 2010 4:20:35 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxBFE
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r23015 r25771 347 347 LogFlow (("VMDisplay::InvalidateAndUpdate(): sending DPYUPDATE request\n")); 348 348 349 Assert( pVM);349 Assert(gpVM); 350 350 /* pdm.h says that this has to be called from the EMT thread */ 351 int rcVBox = VMR3ReqCallVoidWait( pVM, VMCPUID_ANY,351 int rcVBox = VMR3ReqCallVoidWait(gpVM, VMCPUID_ANY, 352 352 (PFNRT)VMDisplay::doInvalidateAndUpdate, 1, mpDrv); 353 353 if (RT_FAILURE(rcVBox)) -
trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp
r23021 r25771 104 104 if (!enabled) 105 105 return E_POINTER; 106 if ( pVM)107 *enabled = !EMIsRawRing3Enabled( pVM);106 if (gpVM) 107 *enabled = !EMIsRawRing3Enabled(gpVM); 108 108 else 109 109 *enabled = false; … … 131 131 } 132 132 } 133 if (! pVM)133 if (!gpVM) 134 134 { 135 135 return E_FAIL; … … 137 137 138 138 EMRAWMODE rawModeFlag = enable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE; 139 int rcVBox = VMR3ReqCallWait( pVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2,pVM, rawModeFlag);139 int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, gpVM, rawModeFlag); 140 140 if (RT_SUCCESS(rcVBox)) 141 141 return S_OK; … … 156 156 if (!enabled) 157 157 return E_POINTER; 158 if ( pVM)159 *enabled = !EMIsRawRing0Enabled( pVM);158 if (gpVM) 159 *enabled = !EMIsRawRing0Enabled(gpVM); 160 160 else 161 161 *enabled = false; … … 183 183 } 184 184 } 185 if (! pVM)185 if (!gpVM) 186 186 { 187 187 return E_FAIL; … … 189 189 190 190 EMRAWMODE rawModeFlag = enable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE; 191 int rcVBox = VMR3ReqCallWait( pVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2,pVM, rawModeFlag);191 int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, gpVM, rawModeFlag); 192 192 if (RT_SUCCESS(rcVBox)) 193 193 return S_OK; … … 208 208 if (!enabled) 209 209 return E_POINTER; 210 if ( pVM)211 *enabled = PATMIsEnabled( pVM);210 if (gpVM) 211 *enabled = PATMIsEnabled(gpVM); 212 212 else 213 213 *enabled = false; … … 236 236 } 237 237 238 if (! pVM)238 if (!gpVM) 239 239 return E_FAIL; 240 240 241 PATMR3AllowPatching( pVM, enable);241 PATMR3AllowPatching(gpVM, enable); 242 242 return E_NOTIMPL; 243 243 } … … 253 253 if (!enabled) 254 254 return E_POINTER; 255 if ( pVM)256 *enabled = CSAMIsEnabled( pVM);255 if (gpVM) 256 *enabled = CSAMIsEnabled(gpVM); 257 257 else 258 258 *enabled = false; … … 281 281 } 282 282 283 if (! pVM)283 if (!gpVM) 284 284 return E_FAIL; 285 285 286 286 if (enable) 287 CSAMEnableScanning( pVM);288 else 289 CSAMDisableScanning( pVM);287 CSAMEnableScanning(gpVM); 288 else 289 CSAMDisableScanning(gpVM); 290 290 return E_NOTIMPL; 291 291 } -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp
r22810 r25771 58 58 ///////////////////////////////////////////////////////////////////////////// 59 59 60 int Mouse::setAbsoluteCoordinates(bool fAbsolute)61 { 62 this->fAbsolute = fAbsolute;63 return S_OK; 64 } 65 66 int Mouse::setNeedsHostCursor(bool fNeedsHostCursor)67 { 68 this->fNeedsHostCursor = fNeedsHostCursor;60 int Mouse::setAbsoluteCoordinates(bool a_fAbsolute) 61 { 62 this->fAbsolute = a_fAbsolute; 63 return S_OK; 64 } 65 66 int Mouse::setNeedsHostCursor(bool a_fNeedsHostCursor) 67 { 68 this->fNeedsHostCursor = a_fNeedsHostCursor; 69 69 return S_OK; 70 70 } … … 228 228 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 229 229 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 230 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 230 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 231 231 ("Configuration error: Not possible to attach anything to this driver!\n"), 232 232 VERR_PDM_DRVINS_NO_ATTACH); … … 301 301 NULL, 302 302 /* pfnDetach */ 303 NULL, 303 NULL, 304 304 /* pfnPowerOff */ 305 NULL, 305 NULL, 306 306 /* pfnSoftReset */ 307 307 NULL, -
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r24018 r25771 125 125 *******************************************************************************/ 126 126 127 PVM pVM= NULL;127 PVM gpVM = NULL; 128 128 Mouse *gMouse = NULL; 129 129 VMDisplay *gDisplay = NULL; … … 956 956 LogFlow(("Returning from main()!\n")); 957 957 958 if ( pVM)958 if (gpVM) 959 959 { 960 960 /* … … 966 966 { 967 967 /* Power off VM */ 968 rc = VMR3PowerOff( pVM);968 rc = VMR3PowerOff(gpVM); 969 969 AssertRC(rc); 970 970 } 971 971 972 972 /* And destroy it */ 973 rc = VMR3Destroy( pVM);973 rc = VMR3Destroy(gpVM); 974 974 AssertRC(rc); 975 975 } … … 1140 1140 { 1141 1141 static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES; 1142 static char s zError[RTPATH_MAX + 128] = "";1142 static char s_szError[RTPATH_MAX + 128] = ""; 1143 1143 PRTLOGGER pLogger; 1144 1144 rc2 = RTLogCreateEx(&pLogger, RTLOGFLAGS_PREFIX_TIME_PROG, "all", 1145 1145 "VBOX_RELEASE_LOG", RT_ELEMENTS(s_apszGroups), s_apszGroups, 1146 RTLOGDEST_FILE, s zError, sizeof(szError), "./VBoxBFE.log");1146 RTLOGDEST_FILE, s_szError, sizeof(s_szError), "./VBoxBFE.log"); 1147 1147 if (RT_SUCCESS(rc2)) 1148 1148 { … … 1161 1161 } 1162 1162 else 1163 RTPrintf("Could not open release log (%s)\n", s zError);1163 RTPrintf("Could not open release log (%s)\n", s_szError); 1164 1164 } 1165 1165 … … 1172 1172 * Create empty VM. 1173 1173 */ 1174 rc = VMR3Create(1, setVMErrorCallback, NULL, vboxbfeConfigConstructor, NULL, & pVM);1174 rc = VMR3Create(1, setVMErrorCallback, NULL, vboxbfeConfigConstructor, NULL, &gpVM); 1175 1175 if (RT_FAILURE(rc)) 1176 1176 { … … 1183 1183 * Register VM state change handler 1184 1184 */ 1185 rc = VMR3AtStateRegister( pVM, vmstateChangeCallback, NULL);1185 rc = VMR3AtStateRegister(gpVM, vmstateChangeCallback, NULL); 1186 1186 if (RT_FAILURE(rc)) 1187 1187 { … … 1202 1202 int cbString; 1203 1203 PRTUTF16 aHostPath, aMapName; 1204 int rc; 1205 1206 rc = RTStrToUtf16(g_pszShareDir[i], &aHostPath); 1207 AssertRC(rc); 1208 rc = RTStrToUtf16(g_pszShareName[i], &aMapName); 1209 AssertRC(rc); 1204 1205 rc2 = RTStrToUtf16(g_pszShareDir[i], &aHostPath); 1206 AssertRC(rc2); 1207 rc2 = RTStrToUtf16(g_pszShareName[i], &aMapName); 1208 AssertRC(rc2); 1210 1209 1211 1210 cbString = (RTUtf16Len (aHostPath) + 1) * sizeof (RTUTF16); … … 1236 1235 parms[2].u.uint32 = !g_fShareReadOnly[i]; 1237 1236 1238 rc = gVMMDev->hgcmHostCall ("VBoxSharedFolders",1239 SHFL_FN_ADD_MAPPING, SHFL_CPARMS_ADD_MAPPING, &parms[0]);1240 AssertRC(rc );1237 rc2 = gVMMDev->hgcmHostCall ("VBoxSharedFolders", 1238 SHFL_FN_ADD_MAPPING, SHFL_CPARMS_ADD_MAPPING, &parms[0]); 1239 AssertRC(rc2); 1241 1240 LogRel(("Added share %s: (%s)\n", g_pszShareName[i], g_pszShareDir[i])); 1242 1241 RTMemFree (pFolderName); … … 1255 1254 { 1256 1255 gHostUSB = new HostUSB(); 1257 gHostUSB->init( pVM);1256 gHostUSB->init(gpVM); 1258 1257 } 1259 1258 #endif /* VBOXBFE_WITH_USB */ … … 1277 1276 { 1278 1277 startProgressInfo("Restoring"); 1279 rc = VMR3LoadFromFile( pVM, g_pszStateFile, callProgressInfo, (uintptr_t)NULL);1278 rc = VMR3LoadFromFile(gpVM, g_pszStateFile, callProgressInfo, (uintptr_t)NULL); 1280 1279 endProgressInfo(); 1281 1280 if (RT_SUCCESS(rc)) 1282 1281 { 1283 rc = VMR3Resume( pVM);1282 rc = VMR3Resume(gpVM); 1284 1283 AssertRC(rc); 1285 1284 gDisplay->setRunning(); … … 1290 1289 else 1291 1290 { 1292 rc = VMR3PowerOn( pVM);1291 rc = VMR3PowerOn(gpVM); 1293 1292 if (RT_FAILURE(rc)) 1294 1293 AssertMsgFailed(("VMR3PowerOn failed, rc=%Rrc\n", rc)); … … 1305 1304 1306 1305 failure: 1307 if ( pVM)1308 { 1309 rc2 = VMR3Destroy( pVM);1306 if (gpVM) 1307 { 1308 rc2 = VMR3Destroy(gpVM); 1310 1309 AssertRC(rc2); 1311 pVM = NULL;1310 gpVM = NULL; 1312 1311 } 1313 1312 machineState = VMSTATE_TERMINATED; -
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.h
r23598 r25771 46 46 47 47 extern VMSTATE machineState; 48 extern PVM pVM;48 extern PVM gpVM; 49 49 extern int gHostKey; 50 50 extern int gHostKeySym; -
trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp
r23021 r25771 62 62 gConsole->inputGrabEnd(); 63 63 64 int rcVBox = VMR3ReqCallWait( pVM, VMCPUID_ANY, (PFNRT)VMR3Suspend, 1,pVM);64 int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)VMR3Suspend, 1, gpVM); 65 65 AssertRC(rcVBox); 66 66 return VINF_SUCCESS; … … 76 76 return VERR_VM_INVALID_VM_STATE; 77 77 78 int rcVBox = VMR3ReqCallWait( pVM, VMCPUID_ANY, (PFNRT)VMR3Resume, 1,pVM);78 int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)VMR3Resume, 1, gpVM); 79 79 AssertRC(rcVBox); 80 80 return VINF_SUCCESS; … … 87 87 VMCtrlReset(void) 88 88 { 89 int rcVBox = VMR3ReqCallWait( pVM, VMCPUID_ANY, (PFNRT)VMR3Reset, 1,pVM);89 int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)VMR3Reset, 1, gpVM); 90 90 AssertRC(rcVBox); 91 91 return VINF_SUCCESS; … … 99 99 { 100 100 PPDMIBASE pBase; 101 int vrc = PDMR3QueryDeviceLun ( pVM, "acpi", 0, 0, &pBase);101 int vrc = PDMR3QueryDeviceLun (gpVM, "acpi", 0, 0, &pBase); 102 102 if (RT_SUCCESS (vrc)) 103 103 { … … 117 117 { 118 118 PPDMIBASE pBase; 119 int vrc = PDMR3QueryDeviceLun ( pVM, "acpi", 0, 0, &pBase);119 int vrc = PDMR3QueryDeviceLun (gpVM, "acpi", 0, 0, &pBase); 120 120 if (RT_SUCCESS (vrc)) 121 121 { … … 137 137 138 138 startProgressInfo("Saving"); 139 rc = VMR3ReqCallWait( pVM, VMCPUID_ANY,140 (PFNRT)VMR3Save, 5, pVM, g_pszStateFile, false /*fContinueAftewards*/, &callProgressInfo, (uintptr_t)NULL);139 rc = VMR3ReqCallWait(gpVM, VMCPUID_ANY, 140 (PFNRT)VMR3Save, 5, gpVM, g_pszStateFile, false /*fContinueAftewards*/, &callProgressInfo, (uintptr_t)NULL); 141 141 AssertRC(rc); 142 142 endProgressInfo(); … … 165 165 if (machineState == VMSTATE_RUNNING) 166 166 { 167 rc = VMR3ReqCallWait( pVM, VMCPUID_ANY, (PFNRT)VMR3Suspend, 1,pVM);167 rc = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)VMR3Suspend, 1, gpVM); 168 168 AssertRC(rc); 169 169 }
Note:
See TracChangeset
for help on using the changeset viewer.