Changeset 34645 in vbox for trunk/src/VBox/Frontends/VBoxSDL
- Timestamp:
- Dec 2, 2010 6:28:04 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68447
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r33976 r34645 108 108 { 109 109 // make a copy of the shape 110 com::SafeArray <BYTE> aShape(ComSafeArrayInArg(pShape));110 com::SafeArray<BYTE> aShape(ComSafeArrayInArg(pShape)); 111 111 size_t cbShapeSize = aShape.size(); 112 112 if (cbShapeSize > 0) … … 192 192 static uint8_t gaModifiersState[256]; 193 193 194 static ComPtr<IMachine> g Machine;195 static ComPtr<IConsole> g Console;196 static ComPtr<IMachineDebugger> g MachineDebugger;197 static ComPtr<IKeyboard> g Keyboard;198 static ComPtr<IMouse> g Mouse;199 static ComPtr<IDisplay> g Display;200 static ComPtr<IVRDEServer> g VRDEServer;201 static ComPtr<IProgress> g Progress;194 static ComPtr<IMachine> gpMachine; 195 static ComPtr<IConsole> gpConsole; 196 static ComPtr<IMachineDebugger> gpMachineDebugger; 197 static ComPtr<IKeyboard> gpKeyboard; 198 static ComPtr<IMouse> gpMouse; 199 static ComPtr<IDisplay> gpDisplay; 200 static ComPtr<IVRDEServer> gpVRDEServer; 201 static ComPtr<IProgress> gpProgress; 202 202 203 203 static ULONG gcMonitors = 1; … … 232 232 233 233 /** 234 * Event handler for VirtualBox events234 * Event handler for VirtualBox (server) events 235 235 */ 236 236 class VBoxSDLEventListener … … 252 252 { 253 253 #ifdef VBOX_SECURELABEL 254 ComPtr<IExtraDataChangedEvent> edcev = aEvent;255 Assert( edcev);256 Bstr key, machineId;257 edcev->COMGETTER(MachineId)(machineId.asOutParam());258 if (g Machine)254 ComPtr<IExtraDataChangedEvent> pEDCEv = aEvent; 255 Assert(pEDCEv); 256 Bstr bstrMachineId; 257 pEDCEv->COMGETTER(MachineId)(bstrMachineId.asOutParam()); 258 if (gpMachine) 259 259 { 260 260 /* 261 261 * check if we're interested in the message 262 262 */ 263 Bstr ourGuid;264 g Machine->COMGETTER(Id)(ourGuid.asOutParam());265 if ( ourGuid == machineId)263 Bstr bstrOurId; 264 gpMachine->COMGETTER(Id)(bstrOurId.asOutParam()); 265 if (bstrOurId == bstrMachineId) 266 266 { 267 Bstr keyString;268 edcev->COMGETTER(Key)(keyString.asOutParam());269 if ( keyString== VBOXSDL_SECURELABEL_EXTRADATA)267 Bstr bstrKey; 268 pEDCEv->COMGETTER(Key)(bstrKey.asOutParam()); 269 if (bstrKey == VBOXSDL_SECURELABEL_EXTRADATA) 270 270 { 271 271 /* … … 282 282 break; 283 283 } 284 284 285 default: 285 286 AssertFailed(); … … 291 292 292 293 /** 293 * Event handler for machine events294 * Event handler for Console events 294 295 */ 295 296 class VBoxSDLConsoleEventListener … … 312 313 case VBoxEventType_OnMousePointerShapeChanged: 313 314 { 314 ComPtr<IMousePointerShapeChangedEvent> mpscev = aEvent;315 Assert( mpscev);315 ComPtr<IMousePointerShapeChangedEvent> pMPSCEv = aEvent; 316 Assert(pMPSCEv); 316 317 PointerShapeChangeData *data; 317 318 BOOL visible, alpha; 318 319 ULONG xHot, yHot, width, height; 319 com::SafeArray 320 321 mpscev->COMGETTER(Visible)(&visible);322 mpscev->COMGETTER(Alpha)(&alpha);323 mpscev->COMGETTER(Xhot)(&xHot);324 mpscev->COMGETTER(Yhot)(&yHot);325 mpscev->COMGETTER(Width)(&width);326 mpscev->COMGETTER(Height)(&height);327 mpscev->COMGETTER(Shape)(ComSafeArrayAsOutParam(shape));320 com::SafeArray<BYTE> shape; 321 322 pMPSCEv->COMGETTER(Visible)(&visible); 323 pMPSCEv->COMGETTER(Alpha)(&alpha); 324 pMPSCEv->COMGETTER(Xhot)(&xHot); 325 pMPSCEv->COMGETTER(Yhot)(&yHot); 326 pMPSCEv->COMGETTER(Width)(&width); 327 pMPSCEv->COMGETTER(Height)(&height); 328 pMPSCEv->COMGETTER(Shape)(ComSafeArrayAsOutParam(shape)); 328 329 data = new PointerShapeChangeData(visible, alpha, xHot, yHot, width, height, 329 330 ComSafeArrayAsInParam(shape)); … … 345 346 case VBoxEventType_OnMouseCapabilityChanged: 346 347 { 347 ComPtr<IMouseCapabilityChangedEvent> mccev = aEvent;348 Assert( mccev);349 mccev->COMGETTER(SupportsAbsolute)(&gfAbsoluteMouseGuest);350 mccev->COMGETTER(SupportsRelative)(&gfRelativeMouseGuest);351 mccev->COMGETTER(NeedsHostCursor)(&gfGuestNeedsHostCursor);348 ComPtr<IMouseCapabilityChangedEvent> pMCCEv = aEvent; 349 Assert(pMCCEv); 350 pMCCEv->COMGETTER(SupportsAbsolute)(&gfAbsoluteMouseGuest); 351 pMCCEv->COMGETTER(SupportsRelative)(&gfRelativeMouseGuest); 352 pMCCEv->COMGETTER(NeedsHostCursor)(&gfGuestNeedsHostCursor); 352 353 SDL_Event event = {0}; 353 354 event.type = SDL_USEREVENT; … … 359 360 case VBoxEventType_OnKeyboardLedsChanged: 360 361 { 361 ComPtr<IKeyboardLedsChangedEvent> klcev = aEvent;362 Assert( klcev);362 ComPtr<IKeyboardLedsChangedEvent> pCLCEv = aEvent; 363 Assert(pCLCEv); 363 364 BOOL fNumLock, fCapsLock, fScrollLock; 364 klcev->COMGETTER(NumLock)(&fNumLock);365 klcev->COMGETTER(CapsLock)(&fCapsLock);366 klcev->COMGETTER(ScrollLock)(&fScrollLock);365 pCLCEv->COMGETTER(NumLock)(&fNumLock); 366 pCLCEv->COMGETTER(CapsLock)(&fCapsLock); 367 pCLCEv->COMGETTER(ScrollLock)(&fScrollLock); 367 368 /* Don't bother the guest with NumLock scancodes if he doesn't set the NumLock LED */ 368 369 if (gfGuestNumLockPressed != fNumLock) … … 378 379 case VBoxEventType_OnStateChanged: 379 380 { 380 ComPtr<IStateChangedEvent> scev = aEvent;381 Assert( scev);381 ComPtr<IStateChangedEvent> pSCEv = aEvent; 382 Assert(pSCEv); 382 383 MachineState_T machineState; 383 scev->COMGETTER(State)(&machineState);384 pSCEv->COMGETTER(State)(&machineState); 384 385 LogFlow(("OnStateChange: machineState = %d (%s)\n", machineState, GetStateName(machineState))); 385 386 SDL_Event event = {0}; … … 415 416 case VBoxEventType_OnRuntimeError: 416 417 { 417 ComPtr<IRuntimeErrorEvent> rteev = aEvent; 418 Assert(rteev); 419 Bstr id, message; 418 ComPtr<IRuntimeErrorEvent> pRTEEv = aEvent; 419 Assert(pRTEEv); 420 420 BOOL fFatal; 421 421 422 rteev->COMGETTER(Fatal)(&fFatal);422 pRTEEv->COMGETTER(Fatal)(&fFatal); 423 423 MachineState_T machineState; 424 g Machine->COMGETTER(State)(&machineState);424 gpMachine->COMGETTER(State)(&machineState); 425 425 const char *pszType; 426 426 bool fPaused = machineState == MachineState_Paused; … … 431 431 else 432 432 pszType = "WARNING"; 433 rteev->COMGETTER(Id)(id.asOutParam()); 434 rteev->COMGETTER(Message)(message.asOutParam()); 435 RTPrintf("\n%s: ** %lS **\n%lS\n%s\n", pszType, id.raw(), message.raw(), 433 Bstr bstrId, bstrMessage; 434 pRTEEv->COMGETTER(Id)(bstrId.asOutParam()); 435 pRTEEv->COMGETTER(Message)(bstrMessage.asOutParam()); 436 RTPrintf("\n%s: ** %lS **\n%lS\n%s\n", pszType, bstrId.raw(), bstrMessage.raw(), 436 437 fPaused ? "The VM was paused. Continue with HostKey + P after you solved the problem.\n" : ""); 437 438 break; … … 440 441 case VBoxEventType_OnCanShowWindow: 441 442 { 442 ComPtr<ICanShowWindowEvent> cswev = aEvent;443 Assert( cswev);443 ComPtr<ICanShowWindowEvent> pCSWEv = aEvent; 444 Assert(pCSWEv); 444 445 #ifdef RT_OS_DARWIN 445 446 /* SDL feature not available on Quartz */ … … 448 449 SDL_VERSION(&info.version); 449 450 if (!SDL_GetWMInfo(&info)) 450 cswev->AddVeto(NULL);451 pCSWEv->AddVeto(NULL); 451 452 #endif 452 453 break; … … 455 456 case VBoxEventType_OnShowWindow: 456 457 { 457 ComPtr<IShowWindowEvent> swev = aEvent;458 Assert( swev);458 ComPtr<IShowWindowEvent> pSWEv = aEvent; 459 Assert(pSWEv); 459 460 #ifndef RT_OS_DARWIN 460 461 SDL_SysWMinfo info; … … 463 464 { 464 465 #if defined(VBOXSDL_WITH_X11) 465 swev->COMSETTER(WinId)((LONG64)info.info.x11.wmwindow);466 pSWEv->COMSETTER(WinId)((LONG64)info.info.x11.wmwindow); 466 467 #elif defined(RT_OS_WINDOWS) 467 swev->COMSETTER(WinId)((LONG64)info.window);468 pSWEv->COMSETTER(WinId)((LONG64)info.window); 468 469 #else 469 470 AssertFailed(); … … 725 726 uint32_t memorySize = 0; 726 727 uint32_t vramSize = 0; 727 IEventListener * vboxListener = NULL;728 VBoxSDLConsoleEventListenerImpl * consoleListener = NULL;728 IEventListener *pVBoxListener = NULL; 729 VBoxSDLConsoleEventListenerImpl *pConsoleListener = NULL; 729 730 730 731 bool fFullscreen = false; … … 1240 1241 if (FAILED(rc)) 1241 1242 { 1242 RTPrintf("Error: COM initialization failed , rc = 0x%x!\n", rc);1243 RTPrintf("Error: COM initialization failed (rc=%Rhrc)!\n", rc); 1243 1244 return 1; 1244 1245 } … … 1251 1252 //////////////////////////////////////////////////////////////////////////// 1252 1253 1253 ComPtr <IVirtualBox> virtualBox;1254 ComPtr <ISession> session;1254 ComPtr<IVirtualBox> pVirtualBox; 1255 ComPtr<ISession> pSession; 1255 1256 bool sessionOpened = false; 1256 1257 EventQueue* eventQ = com::EventQueue::getMainEventQueue(); … … 1259 1260 ComPtr<IMachine> pMachine; 1260 1261 1261 rc = virtualBox.createLocalObject(CLSID_VirtualBox);1262 rc = pVirtualBox.createLocalObject(CLSID_VirtualBox); 1262 1263 if (FAILED(rc)) 1263 1264 { … … 1267 1268 info.getText().raw(), info.getComponent().raw()); 1268 1269 else 1269 RTPrintf("Failed to create VirtualBox object! No error information available (rc = 0x%x).\n", rc);1270 RTPrintf("Failed to create VirtualBox object! No error information available (rc=%Rhrc).\n", rc); 1270 1271 goto leave; 1271 1272 } 1272 rc = session.createInprocObject(sessionID);1273 rc = pSession.createInprocObject(sessionID); 1273 1274 if (FAILED(rc)) 1274 1275 { 1275 RTPrintf("Failed to create session object , rc = 0x%x!\n", rc);1276 RTPrintf("Failed to create session object (rc=%Rhrc)!\n", rc); 1276 1277 goto leave; 1277 1278 } … … 1282 1283 if (vmName && uuidVM.isEmpty()) 1283 1284 { 1284 Bstr bstrVMName = vmName; 1285 rc = virtualBox->FindMachine(bstrVMName.raw(), pMachine.asOutParam()); 1285 rc = pVirtualBox->FindMachine(Bstr(vmName).raw(), pMachine.asOutParam()); 1286 1286 if ((rc == S_OK) && pMachine) 1287 1287 { 1288 Bstr id;1289 pMachine->COMGETTER(Id)( id.asOutParam());1290 uuidVM = Guid( id);1288 Bstr bstrId; 1289 pMachine->COMGETTER(Id)(bstrId.asOutParam()); 1290 uuidVM = Guid(bstrId); 1291 1291 } 1292 1292 else … … 1306 1306 AssertReleaseRC(vrc); 1307 1307 1308 rc = pMachine->LockMachine( session, LockType_Write);1308 rc = pMachine->LockMachine(pSession, LockType_Write); 1309 1309 if (FAILED(rc)) 1310 1310 { … … 1312 1312 if (info.isFullAvailable()) 1313 1313 PrintError("Could not open VirtualBox session", 1314 info.getText().raw(), info.getComponent().raw());1314 info.getText().raw(), info.getComponent().raw()); 1315 1315 goto leave; 1316 1316 } 1317 if (! session)1317 if (!pSession) 1318 1318 { 1319 1319 RTPrintf("Could not open VirtualBox session!\n"); … … 1322 1322 sessionOpened = true; 1323 1323 // get the mutable VM we're dealing with 1324 session->COMGETTER(Machine)(gMachine.asOutParam());1325 if (!g Machine)1324 pSession->COMGETTER(Machine)(gpMachine.asOutParam()); 1325 if (!gpMachine) 1326 1326 { 1327 1327 com::ErrorInfo info; … … 1334 1334 } 1335 1335 // get the VM console 1336 session->COMGETTER(Console)(gConsole.asOutParam());1337 if (!g Console)1336 pSession->COMGETTER(Console)(gpConsole.asOutParam()); 1337 if (!gpConsole) 1338 1338 { 1339 1339 RTPrintf("Given console not found!\n"); … … 1346 1346 if (hdaFile) 1347 1347 { 1348 ComPtr<IMedium> pMedium; 1349 1348 1350 /* 1349 * Strategy: iterate through all registered hard disk 1350 * and see if one of them points to the same file. If 1351 * so, assign it. If not, register a new image and assign 1352 * it to the VM. 1351 * Strategy: if any registered hard disk points to the same file, 1352 * assign it. If not, register a new image and assign it to the VM. 1353 1353 */ 1354 Bstr hdaFileBstr = hdaFile; 1355 ComPtr<IMedium> hardDisk; 1356 virtualBox->FindMedium(hdaFileBstr.raw(), DeviceType_HardDisk, 1357 hardDisk.asOutParam()); 1358 if (!hardDisk) 1354 Bstr bstrHdaFile(hdaFile); 1355 pVirtualBox->FindMedium(bstrHdaFile.raw(), DeviceType_HardDisk, 1356 pMedium.asOutParam()); 1357 if (!pMedium) 1359 1358 { 1360 1359 /* we've not found the image */ 1361 RTPrintf("Adding hard disk '% S'...\n", hdaFile);1362 virtualBox->OpenMedium(hdaFileBstr.raw(), DeviceType_HardDisk,1363 AccessMode_ReadWrite, hardDisk.asOutParam());1360 RTPrintf("Adding hard disk '%s'...\n", hdaFile); 1361 pVirtualBox->OpenMedium(bstrHdaFile.raw(), DeviceType_HardDisk, 1362 AccessMode_ReadWrite, pMedium.asOutParam()); 1364 1363 } 1365 1364 /* do we have the right image now? */ 1366 if (hardDisk) 1367 { 1368 /* 1369 * Go and attach it! 1370 */ 1371 Bstr storageCtlName; 1365 if (pMedium) 1366 { 1367 Bstr bstrSCName; 1372 1368 1373 1369 /* get the first IDE controller to attach the harddisk to 1374 * and if there is none, add one temporarily 1375 */ 1376 { 1377 ComPtr<IStorageController> storageCtl; 1370 * and if there is none, add one temporarily */ 1371 { 1372 ComPtr<IStorageController> pStorageCtl; 1378 1373 com::SafeIfaceArray<IStorageController> aStorageControllers; 1379 CHECK_ERROR(g Machine, COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(aStorageControllers)));1374 CHECK_ERROR(gpMachine, COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(aStorageControllers))); 1380 1375 for (size_t i = 0; i < aStorageControllers.size(); ++ i) 1381 1376 { … … 1385 1380 if (storageBus == StorageBus_IDE) 1386 1381 { 1387 storageCtl = aStorageControllers[i];1382 pStorageCtl = aStorageControllers[i]; 1388 1383 break; 1389 1384 } 1390 1385 } 1391 1386 1392 if ( storageCtl)1387 if (pStorageCtl) 1393 1388 { 1394 CHECK_ERROR( storageCtl, COMGETTER(Name)(storageCtlName.asOutParam()));1395 g Machine->DetachDevice(storageCtlName.raw(), 0, 0);1389 CHECK_ERROR(pStorageCtl, COMGETTER(Name)(bstrSCName.asOutParam())); 1390 gpMachine->DetachDevice(bstrSCName.raw(), 0, 0); 1396 1391 } 1397 1392 else 1398 1393 { 1399 storageCtlName = "IDE Controller";1400 CHECK_ERROR(g Machine, AddStorageController(storageCtlName.raw(),1401 StorageBus_IDE,1402 storageCtl.asOutParam()));1394 bstrSCName = "IDE Controller"; 1395 CHECK_ERROR(gpMachine, AddStorageController(bstrSCName.raw(), 1396 StorageBus_IDE, 1397 pStorageCtl.asOutParam())); 1403 1398 } 1404 1399 } 1405 1400 1406 gMachine->AttachDevice(storageCtlName.raw(), 0, 0,1407 DeviceType_HardDisk, hardDisk);1401 CHECK_ERROR(gpMachine, AttachDevice(bstrSCName.raw(), 0, 0, 1402 DeviceType_HardDisk, pMedium)); 1408 1403 /// @todo why is this attachment saved? 1409 1404 } … … 1421 1416 do 1422 1417 { 1423 ComPtr<IMedium> floppyMedium;1418 ComPtr<IMedium> pMedium; 1424 1419 1425 1420 /* unmount? */ … … 1430 1425 else 1431 1426 { 1432 Bstr medium = fdaFile;1427 Bstr bstrFdaFile(fdaFile); 1433 1428 1434 1429 /* Assume it's a host drive name */ 1435 ComPtr <IHost> host;1436 CHECK_ERROR_BREAK( virtualBox, COMGETTER(Host)(host.asOutParam()));1437 rc = host->FindHostFloppyDrive(medium.raw(),1438 floppyMedium.asOutParam());1430 ComPtr<IHost> pHost; 1431 CHECK_ERROR_BREAK(pVirtualBox, COMGETTER(Host)(pHost.asOutParam())); 1432 rc = pHost->FindHostFloppyDrive(bstrFdaFile.raw(), 1433 pMedium.asOutParam()); 1439 1434 if (FAILED(rc)) 1440 1435 { 1441 1436 /* try to find an existing one */ 1442 rc = virtualBox->FindMedium(medium.raw(), DeviceType_Floppy,1443 floppyMedium.asOutParam());1437 rc = pVirtualBox->FindMedium(bstrFdaFile.raw(), DeviceType_Floppy, 1438 pMedium.asOutParam()); 1444 1439 if (FAILED(rc)) 1445 1440 { 1446 1441 /* try to add to the list */ 1447 RTPrintf("Adding floppy image '% S'...\n", fdaFile);1448 CHECK_ERROR_BREAK( virtualBox,1449 OpenMedium( medium.raw(),1442 RTPrintf("Adding floppy image '%s'...\n", fdaFile); 1443 CHECK_ERROR_BREAK(pVirtualBox, 1444 OpenMedium(bstrFdaFile.raw(), 1450 1445 DeviceType_Floppy, 1451 1446 AccessMode_ReadWrite, 1452 floppyMedium.asOutParam()));1447 pMedium.asOutParam())); 1453 1448 } 1454 1449 } 1455 1450 } 1456 1451 1457 Bstr storageCtlName;1452 Bstr bstrSCName; 1458 1453 1459 1454 /* get the first floppy controller to attach the floppy to 1460 * and if there is none, add one temporarily 1461 */ 1462 { 1463 ComPtr<IStorageController> storageCtl; 1455 * and if there is none, add one temporarily */ 1456 { 1457 ComPtr<IStorageController> pStorageCtl; 1464 1458 com::SafeIfaceArray<IStorageController> aStorageControllers; 1465 CHECK_ERROR(g Machine, COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(aStorageControllers)));1459 CHECK_ERROR(gpMachine, COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(aStorageControllers))); 1466 1460 for (size_t i = 0; i < aStorageControllers.size(); ++ i) 1467 1461 { … … 1471 1465 if (storageBus == StorageBus_Floppy) 1472 1466 { 1473 storageCtl = aStorageControllers[i];1467 pStorageCtl = aStorageControllers[i]; 1474 1468 break; 1475 1469 } 1476 1470 } 1477 1471 1478 if (storageCtl) 1479 { 1480 ComPtr<IMediumAttachment> floppyAttachment; 1481 1482 CHECK_ERROR(storageCtl, COMGETTER(Name)(storageCtlName.asOutParam())); 1483 rc = gMachine->GetMediumAttachment(storageCtlName.raw(), 0, 0, 1484 floppyAttachment.asOutParam()); 1485 if (FAILED(rc)) 1486 CHECK_ERROR(gMachine, AttachDevice(storageCtlName.raw(), 0, 0, 1487 DeviceType_Floppy, NULL)); 1472 if (pStorageCtl) 1473 { 1474 CHECK_ERROR(pStorageCtl, COMGETTER(Name)(bstrSCName.asOutParam())); 1475 gpMachine->DetachDevice(bstrSCName.raw(), 0, 0); 1488 1476 } 1489 1477 else 1490 1478 { 1491 storageCtlName = "Floppy Controller"; 1492 CHECK_ERROR(gMachine, AddStorageController(storageCtlName.raw(), 1493 StorageBus_Floppy, 1494 storageCtl.asOutParam())); 1495 CHECK_ERROR(gMachine, AttachDevice(storageCtlName.raw(), 0, 0, 1496 DeviceType_Floppy, NULL)); 1497 } 1498 } 1499 1500 CHECK_ERROR(gMachine, MountMedium(storageCtlName.raw(), 0, 0, floppyMedium, 1501 FALSE /* aForce */)); 1479 bstrSCName = "Floppy Controller"; 1480 CHECK_ERROR(gpMachine, AddStorageController(bstrSCName.raw(), 1481 StorageBus_Floppy, 1482 pStorageCtl.asOutParam())); 1483 } 1484 } 1485 1486 CHECK_ERROR(gpMachine, AttachDevice(bstrSCName.raw(), 0, 0, 1487 DeviceType_Floppy, pMedium)); 1502 1488 } 1503 1489 while (0); … … 1511 1497 do 1512 1498 { 1513 ComPtr<IMedium> dvdMedium;1499 ComPtr<IMedium> pMedium; 1514 1500 1515 1501 /* unmount? */ … … 1520 1506 else 1521 1507 { 1522 Bstr medium = cdromFile;1508 Bstr bstrCdromFile(cdromFile); 1523 1509 1524 1510 /* Assume it's a host drive name */ 1525 ComPtr <IHost> host;1526 CHECK_ERROR_BREAK( virtualBox, COMGETTER(Host)(host.asOutParam()));1527 rc = host->FindHostDVDDrive(medium.raw(), dvdMedium.asOutParam());1511 ComPtr<IHost> pHost; 1512 CHECK_ERROR_BREAK(pVirtualBox, COMGETTER(Host)(pHost.asOutParam())); 1513 rc = pHost->FindHostDVDDrive(bstrCdromFile.raw(), pMedium.asOutParam()); 1528 1514 if (FAILED(rc)) 1529 1515 { 1530 1516 /* try to find an existing one */ 1531 rc = virtualBox->FindMedium(medium.raw(), DeviceType_DVD,1532 dvdMedium.asOutParam());1517 rc = pVirtualBox->FindMedium(bstrCdromFile.raw(), DeviceType_DVD, 1518 pMedium.asOutParam()); 1533 1519 if (FAILED(rc)) 1534 1520 { 1535 1521 /* try to add to the list */ 1536 RTPrintf("Adding ISO image '%S'...\n", cdromFile); 1537 CHECK_ERROR_BREAK(virtualBox, OpenMedium(medium.raw(), 1538 DeviceType_DVD, 1539 AccessMode_ReadWrite, 1540 dvdMedium.asOutParam())); 1522 RTPrintf("Adding ISO image '%s'...\n", cdromFile); 1523 CHECK_ERROR_BREAK(pVirtualBox, 1524 OpenMedium(bstrCdromFile.raw(), 1525 DeviceType_DVD, 1526 AccessMode_ReadWrite, 1527 pMedium.asOutParam())); 1541 1528 } 1542 1529 } 1543 1530 } 1544 1531 1545 Bstr storageCtlName; 1546 1547 /* get the first IDE controller to attach the DVD Drive to 1548 * and if there is none, add one temporarily 1549 */ 1550 { 1551 ComPtr<IStorageController> storageCtl; 1532 Bstr bstrSCName; 1533 1534 /* get the first IDE controller to attach the DVD drive to 1535 * and if there is none, add one temporarily */ 1536 { 1537 ComPtr<IStorageController> pStorageCtl; 1552 1538 com::SafeIfaceArray<IStorageController> aStorageControllers; 1553 CHECK_ERROR(g Machine, COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(aStorageControllers)));1539 CHECK_ERROR(gpMachine, COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(aStorageControllers))); 1554 1540 for (size_t i = 0; i < aStorageControllers.size(); ++ i) 1555 1541 { … … 1559 1545 if (storageBus == StorageBus_IDE) 1560 1546 { 1561 storageCtl = aStorageControllers[i];1547 pStorageCtl = aStorageControllers[i]; 1562 1548 break; 1563 1549 } 1564 1550 } 1565 1551 1566 if (storageCtl) 1567 { 1568 ComPtr<IMediumAttachment> dvdAttachment; 1569 1570 CHECK_ERROR(storageCtl, COMGETTER(Name)(storageCtlName.asOutParam())); 1571 gMachine->DetachDevice(storageCtlName.raw(), 1, 0); 1572 CHECK_ERROR(gMachine, AttachDevice(storageCtlName.raw(), 1, 0, 1573 DeviceType_DVD, NULL)); 1552 if (pStorageCtl) 1553 { 1554 CHECK_ERROR(pStorageCtl, COMGETTER(Name)(bstrSCName.asOutParam())); 1555 gpMachine->DetachDevice(bstrSCName.raw(), 1, 0); 1574 1556 } 1575 1557 else 1576 1558 { 1577 storageCtlName = "IDE Controller"; 1578 CHECK_ERROR(gMachine, AddStorageController(storageCtlName.raw(), 1579 StorageBus_IDE, 1580 storageCtl.asOutParam())); 1581 CHECK_ERROR(gMachine, AttachDevice(storageCtlName.raw(), 1, 0, 1582 DeviceType_DVD, NULL)); 1583 } 1584 } 1585 1586 CHECK_ERROR(gMachine, MountMedium(storageCtlName.raw(), 1, 0, dvdMedium, 1587 FALSE /*aForce */)); 1559 bstrSCName = "IDE Controller"; 1560 CHECK_ERROR(gpMachine, AddStorageController(bstrSCName.raw(), 1561 StorageBus_IDE, 1562 pStorageCtl.asOutParam())); 1563 } 1564 } 1565 1566 CHECK_ERROR(gpMachine, AttachDevice(bstrSCName.raw(), 1, 0, 1567 DeviceType_DVD, pMedium)); 1588 1568 } 1589 1569 while (0); … … 1598 1578 */ 1599 1579 MachineState_T machineState; 1600 g Machine->COMGETTER(State)(&machineState);1580 gpMachine->COMGETTER(State)(&machineState); 1601 1581 if (machineState == MachineState_Saved) 1602 1582 { 1603 CHECK_ERROR(g Console, DiscardSavedState(true /* fDeleteFile */));1583 CHECK_ERROR(gpConsole, DiscardSavedState(true /* fDeleteFile */)); 1604 1584 } 1605 1585 /* … … 1608 1588 */ 1609 1589 ULONG cSnapshots; 1610 g Machine->COMGETTER(SnapshotCount)(&cSnapshots);1590 gpMachine->COMGETTER(SnapshotCount)(&cSnapshots); 1611 1591 if (cSnapshots) 1612 1592 { 1613 g Progress = NULL;1593 gpProgress = NULL; 1614 1594 1615 1595 ComPtr<ISnapshot> pCurrentSnapshot; 1616 CHECK_ERROR(g Machine, COMGETTER(CurrentSnapshot)(pCurrentSnapshot.asOutParam()));1596 CHECK_ERROR(gpMachine, COMGETTER(CurrentSnapshot)(pCurrentSnapshot.asOutParam())); 1617 1597 if (FAILED(rc)) 1618 1598 goto leave; 1619 1599 1620 CHECK_ERROR(g Console, RestoreSnapshot(pCurrentSnapshot, gProgress.asOutParam()));1621 rc = g Progress->WaitForCompletion(-1);1600 CHECK_ERROR(gpConsole, RestoreSnapshot(pCurrentSnapshot, gpProgress.asOutParam())); 1601 rc = gpProgress->WaitForCompletion(-1); 1622 1602 } 1623 1603 } 1624 1604 1625 1605 // get the machine debugger (does not have to be there) 1626 g Console->COMGETTER(Debugger)(gMachineDebugger.asOutParam());1627 if (g MachineDebugger)1606 gpConsole->COMGETTER(Debugger)(gpMachineDebugger.asOutParam()); 1607 if (gpMachineDebugger) 1628 1608 { 1629 1609 Log(("Machine debugger available!\n")); 1630 1610 } 1631 g Console->COMGETTER(Display)(gDisplay.asOutParam());1632 if (!g Display)1611 gpConsole->COMGETTER(Display)(gpDisplay.asOutParam()); 1612 if (!gpDisplay) 1633 1613 { 1634 1614 RTPrintf("Error: could not get display object!\n"); … … 1639 1619 if (bootDevice != DeviceType_Null) 1640 1620 { 1641 rc = g Machine->SetBootOrder(1, bootDevice);1621 rc = gpMachine->SetBootOrder(1, bootDevice); 1642 1622 if (rc != S_OK) 1643 1623 { … … 1649 1629 if (memorySize) 1650 1630 { 1651 rc = g Machine->COMSETTER(MemorySize)(memorySize);1631 rc = gpMachine->COMSETTER(MemorySize)(memorySize); 1652 1632 if (rc != S_OK) 1653 1633 { 1654 1634 ULONG ramSize = 0; 1655 g Machine->COMGETTER(MemorySize)(&ramSize);1635 gpMachine->COMGETTER(MemorySize)(&ramSize); 1656 1636 RTPrintf("Error: could not set memory size, using current setting of %d MBytes\n", ramSize); 1657 1637 } … … 1660 1640 if (vramSize) 1661 1641 { 1662 rc = g Machine->COMSETTER(VRAMSize)(vramSize);1642 rc = gpMachine->COMSETTER(VRAMSize)(vramSize); 1663 1643 if (rc != S_OK) 1664 1644 { 1665 g Machine->COMGETTER(VRAMSize)((ULONG*)&vramSize);1645 gpMachine->COMGETTER(VRAMSize)((ULONG*)&vramSize); 1666 1646 RTPrintf("Error: could not set VRAM size, using current setting of %d MBytes\n", vramSize); 1667 1647 } … … 1684 1664 goto leave; 1685 1665 1686 g Machine->COMGETTER(MonitorCount)(&gcMonitors);1666 gpMachine->COMGETTER(MonitorCount)(&gcMonitors); 1687 1667 if (gcMonitors > 64) 1688 1668 gcMonitors = 64; … … 1749 1729 goto leave; 1750 1730 } 1751 Bstr key = VBOXSDL_SECURELABEL_EXTRADATA; 1752 Bstr label; 1753 gMachine->GetExtraData(key.raw(), label.asOutParam()); 1754 Utf8Str labelUtf8 = label; 1731 Bstr bstrLabel; 1732 gpMachine->GetExtraData(Bstr(VBOXSDL_SECURELABEL_EXTRADATA).raw(), bstrLabel.asOutParam()); 1733 Utf8Str labelUtf8(bstrLabel); 1755 1734 /* 1756 1735 * Now update the label … … 1773 1752 { 1774 1753 // register our framebuffer 1775 rc = g Display->SetFramebuffer(i, gpFramebuffer[i]);1754 rc = gpDisplay->SetFramebuffer(i, gpFramebuffer[i]); 1776 1755 if (FAILED(rc)) 1777 1756 { … … 1781 1760 IFramebuffer *dummyFb; 1782 1761 LONG xOrigin, yOrigin; 1783 rc = g Display->GetFramebuffer(i, &dummyFb, &xOrigin, &yOrigin);1762 rc = gpDisplay->GetFramebuffer(i, &dummyFb, &xOrigin, &yOrigin); 1784 1763 gpFramebuffer[i]->setOrigin(xOrigin, yOrigin); 1785 1764 } 1786 1765 1787 1766 { 1788 // register listener for globalevents1789 ComPtr<IEventSource> es;1790 CHECK_ERROR( virtualBox, COMGETTER(EventSource)(es.asOutParam()));1791 vboxListener = new VBoxSDLEventListenerImpl();1792 com::SafeArray 1767 // register listener for VirtualBox (server) events 1768 ComPtr<IEventSource> pES; 1769 CHECK_ERROR(pVirtualBox, COMGETTER(EventSource)(pES.asOutParam())); 1770 pVBoxListener = new VBoxSDLEventListenerImpl(); 1771 com::SafeArray<VBoxEventType_T> eventTypes; 1793 1772 eventTypes.push_back(VBoxEventType_OnExtraDataChanged); 1794 CHECK_ERROR( es, RegisterListener(vboxListener, ComSafeArrayAsInParam(eventTypes), true));1795 } 1796 1797 { 1798 // register listener for machine events1799 ComPtr<IEventSource> es;1800 CHECK_ERROR(g Console, COMGETTER(EventSource)(es.asOutParam()));1801 consoleListener = new VBoxSDLConsoleEventListenerImpl();1802 com::SafeArray 1773 CHECK_ERROR(pES, RegisterListener(pVBoxListener, ComSafeArrayAsInParam(eventTypes), true)); 1774 } 1775 1776 { 1777 // register listener for Console events 1778 ComPtr<IEventSource> pES; 1779 CHECK_ERROR(gpConsole, COMGETTER(EventSource)(pES.asOutParam())); 1780 pConsoleListener = new VBoxSDLConsoleEventListenerImpl(); 1781 com::SafeArray<VBoxEventType_T> eventTypes; 1803 1782 eventTypes.push_back(VBoxEventType_OnMousePointerShapeChanged); 1804 1783 eventTypes.push_back(VBoxEventType_OnMouseCapabilityChanged); … … 1808 1787 eventTypes.push_back(VBoxEventType_OnCanShowWindow); 1809 1788 eventTypes.push_back(VBoxEventType_OnShowWindow); 1810 CHECK_ERROR( es, RegisterListener(consoleListener, ComSafeArrayAsInParam(eventTypes), true));1789 CHECK_ERROR(pES, RegisterListener(pConsoleListener, ComSafeArrayAsInParam(eventTypes), true)); 1811 1790 // until we've tried to to start the VM, ignore power off events 1812 consoleListener->getWrapped()->ignorePowerOffEvents(true);1791 pConsoleListener->getWrapped()->ignorePowerOffEvents(true); 1813 1792 } 1814 1793 1815 1794 if (portVRDP) 1816 1795 { 1817 rc = g Machine->COMGETTER(VRDEServer)(gVRDEServer.asOutParam());1818 AssertMsg((rc == S_OK) && g VRDEServer, ("Could not get VRDP Server! rc = 0x%x\n", rc));1819 if (g VRDEServer)1796 rc = gpMachine->COMGETTER(VRDEServer)(gpVRDEServer.asOutParam()); 1797 AssertMsg((rc == S_OK) && gpVRDEServer, ("Could not get VRDP Server! rc = 0x%x\n", rc)); 1798 if (gpVRDEServer) 1820 1799 { 1821 1800 // has a non standard VRDP port been requested? 1822 1801 if (portVRDP > 0) 1823 1802 { 1824 Bstr bstr = portVRDP; 1825 rc = gVRDEServer->SetVRDEProperty(Bstr("TCP/Ports").raw(), bstr.raw()); 1803 rc = gpVRDEServer->SetVRDEProperty(Bstr("TCP/Ports").raw(), Bstr(portVRDP).raw()); 1826 1804 if (rc != S_OK) 1827 1805 { … … 1831 1809 } 1832 1810 // now enable VRDP 1833 rc = g VRDEServer->COMSETTER(Enabled)(TRUE);1811 rc = gpVRDEServer->COMSETTER(Enabled)(TRUE); 1834 1812 if (rc != S_OK) 1835 1813 { … … 1844 1822 if (fRawR0 != ~0U) 1845 1823 { 1846 if (!g MachineDebugger)1824 if (!gpMachineDebugger) 1847 1825 { 1848 1826 RTPrintf("Error: No debugger object; -%srawr0 cannot be executed!\n", fRawR0 ? "" : "no"); 1849 1827 goto leave; 1850 1828 } 1851 g MachineDebugger->COMSETTER(RecompileSupervisor)(!fRawR0);1829 gpMachineDebugger->COMSETTER(RecompileSupervisor)(!fRawR0); 1852 1830 } 1853 1831 if (fRawR3 != ~0U) 1854 1832 { 1855 if (!g MachineDebugger)1833 if (!gpMachineDebugger) 1856 1834 { 1857 1835 RTPrintf("Error: No debugger object; -%srawr3 cannot be executed!\n", fRawR0 ? "" : "no"); 1858 1836 goto leave; 1859 1837 } 1860 g MachineDebugger->COMSETTER(RecompileUser)(!fRawR3);1838 gpMachineDebugger->COMSETTER(RecompileUser)(!fRawR3); 1861 1839 } 1862 1840 if (fPATM != ~0U) 1863 1841 { 1864 if (!g MachineDebugger)1842 if (!gpMachineDebugger) 1865 1843 { 1866 1844 RTPrintf("Error: No debugger object; -%spatm cannot be executed!\n", fRawR0 ? "" : "no"); 1867 1845 goto leave; 1868 1846 } 1869 g MachineDebugger->COMSETTER(PATMEnabled)(fPATM);1847 gpMachineDebugger->COMSETTER(PATMEnabled)(fPATM); 1870 1848 } 1871 1849 if (fCSAM != ~0U) 1872 1850 { 1873 if (!g MachineDebugger)1851 if (!gpMachineDebugger) 1874 1852 { 1875 1853 RTPrintf("Error: No debugger object; -%scsam cannot be executed!\n", fRawR0 ? "" : "no"); 1876 1854 goto leave; 1877 1855 } 1878 g MachineDebugger->COMSETTER(CSAMEnabled)(fCSAM);1856 gpMachineDebugger->COMSETTER(CSAMEnabled)(fCSAM); 1879 1857 } 1880 1858 if (fHWVirt != ~0U) 1881 1859 { 1882 g Machine->SetHWVirtExProperty(HWVirtExPropertyType_Enabled, fHWVirt);1860 gpMachine->SetHWVirtExProperty(HWVirtExPropertyType_Enabled, fHWVirt); 1883 1861 } 1884 1862 if (u32WarpDrive != 0) 1885 1863 { 1886 if (!g MachineDebugger)1864 if (!gpMachineDebugger) 1887 1865 { 1888 1866 RTPrintf("Error: No debugger object; --warpdrive %d cannot be executed!\n", u32WarpDrive); 1889 1867 goto leave; 1890 1868 } 1891 g MachineDebugger->COMSETTER(VirtualTimeRate)(u32WarpDrive);1869 gpMachineDebugger->COMSETTER(VirtualTimeRate)(u32WarpDrive); 1892 1870 } 1893 1871 #endif /* VBOXSDL_ADVANCED_OPTIONS */ … … 1951 1929 1952 1930 LogFlow(("Powering up the VM...\n")); 1953 rc = g Console->PowerUp(gProgress.asOutParam());1931 rc = gpConsole->PowerUp(gpProgress.asOutParam()); 1954 1932 if (rc != S_OK) 1955 1933 { 1956 com::ErrorInfo info(g Console, COM_IIDOF(IConsole));1934 com::ErrorInfo info(gpConsole, COM_IIDOF(IConsole)); 1957 1935 if (info.isBasicAvailable()) 1958 1936 PrintError("Failed to power up VM", info.getText().raw()); … … 1979 1957 1980 1958 LogRel(("VBoxSDL: NUM lock initially %s, CAPS lock initially %s\n", 1981 1982 1959 !!(SDL_GetModState() & KMOD_NUM) ? "ON" : "OFF", 1960 !!(SDL_GetModState() & KMOD_CAPS) ? "ON" : "OFF")); 1983 1961 1984 1962 /* start regular timer so we don't starve in the event loop */ … … 1990 1968 do 1991 1969 { 1992 rc = g Machine->COMGETTER(State)(&machineState);1970 rc = gpMachine->COMGETTER(State)(&machineState); 1993 1971 if ( rc == S_OK 1994 1972 && ( machineState == MachineState_Starting … … 2041 2019 gpFramebuffer[event.user.code]->resizeGuest(); 2042 2020 /* update xOrigin, yOrigin -> mouse */ 2043 rc = g Display->GetFramebuffer(event.user.code, &dummyFb, &xOrigin, &yOrigin);2021 rc = gpDisplay->GetFramebuffer(event.user.code, &dummyFb, &xOrigin, &yOrigin); 2044 2022 gpFramebuffer[event.user.code]->setOrigin(xOrigin, yOrigin); 2045 2023 /* notify the display that the resize has been completed */ 2046 g Display->ResizeCompleted(event.user.code);2024 gpDisplay->ResizeCompleted(event.user.code); 2047 2025 break; 2048 2026 } … … 2068 2046 if (event.user.code != VBOXSDL_TERM_NORMAL) 2069 2047 { 2070 com::ProgressErrorInfo info(g Progress);2048 com::ProgressErrorInfo info(gpProgress); 2071 2049 if (info.isBasicAvailable()) 2072 2050 PrintError("Failed to power up VM", info.getText().raw()); … … 2106 2084 if (machineState != MachineState_Running) 2107 2085 { 2108 com::ProgressErrorInfo info(g Progress);2086 com::ProgressErrorInfo info(gpProgress); 2109 2087 if (info.isBasicAvailable()) 2110 2088 PrintError("Failed to power up VM", info.getText().raw()); … … 2116 2094 // accept power off events from now on because we're running 2117 2095 // note that there's a possible race condition here... 2118 consoleListener->getWrapped()->ignorePowerOffEvents(false);2119 2120 rc = g Console->COMGETTER(Keyboard)(gKeyboard.asOutParam());2121 if (!g Keyboard)2096 pConsoleListener->getWrapped()->ignorePowerOffEvents(false); 2097 2098 rc = gpConsole->COMGETTER(Keyboard)(gpKeyboard.asOutParam()); 2099 if (!gpKeyboard) 2122 2100 { 2123 2101 RTPrintf("Error: could not get keyboard object!\n"); 2124 2102 goto leave; 2125 2103 } 2126 g Console->COMGETTER(Mouse)(gMouse.asOutParam());2127 if (!g Mouse)2104 gpConsole->COMGETTER(Mouse)(gpMouse.asOutParam()); 2105 if (!gpMouse) 2128 2106 { 2129 2107 RTPrintf("Error: could not get mouse object!\n"); … … 2333 2311 if (!gfACPITerm || gSdlQuitTimer) 2334 2312 goto leave; 2335 if (g Console)2336 g Console->PowerButton();2313 if (gpConsole) 2314 gpConsole->PowerButton(); 2337 2315 gSdlQuitTimer = SDL_AddTimer(1000, QuitTimer, NULL); 2338 2316 break; … … 2442 2420 case SDL_VIDEORESIZE: 2443 2421 { 2444 if (g Display)2422 if (gpDisplay) 2445 2423 { 2446 2424 if (gfIgnoreNextResize) … … 2484 2462 int h = DECODEH(event); 2485 2463 LogFlow(("SDL_USER_EVENT_UPDATERECT: x = %d, y = %d, w = %d, h = %d\n", 2486 x, y, w, h));2464 x, y, w, h)); 2487 2465 2488 2466 Assert(gpFramebuffer[event.user.code]); … … 2509 2487 */ 2510 2488 /* communicate the resize event to the guest */ 2511 g Display->SetVideoModeHint(uResizeWidth, uResizeHeight, 0, 0);2489 gpDisplay->SetVideoModeHint(uResizeWidth, uResizeHeight, 0, 0); 2512 2490 break; 2513 2491 … … 2524 2502 gpFramebuffer[event.user.code]->resizeGuest(); 2525 2503 /* update xOrigin, yOrigin -> mouse */ 2526 rc = g Display->GetFramebuffer(event.user.code, &dummyFb, &xOrigin, &yOrigin);2504 rc = gpDisplay->GetFramebuffer(event.user.code, &dummyFb, &xOrigin, &yOrigin); 2527 2505 gpFramebuffer[event.user.code]->setOrigin(xOrigin, yOrigin); 2528 2506 /* notify the display that the resize has been completed */ 2529 g Display->ResizeCompleted(event.user.code);2507 gpDisplay->ResizeCompleted(event.user.code); 2530 2508 break; 2531 2509 } … … 2572 2550 * Query the new label text 2573 2551 */ 2574 Bstr key = VBOXSDL_SECURELABEL_EXTRADATA; 2575 Bstr label; 2576 gMachine->GetExtraData(key.raw(), label.asOutParam()); 2577 Utf8Str labelUtf8 = label; 2552 Bstr bstrLabel; 2553 gpMachine->GetExtraData(Bstr(VBOXSDL_SECURELABEL_EXTRADATA).raw(), bstrLabel.asOutParam()); 2554 Utf8Str labelUtf8(bstrLabel); 2578 2555 /* 2579 2556 * Now update the label … … 2622 2599 #endif /* VBOX_WITH_XPCOM */ 2623 2600 2624 if (g VRDEServer)2625 rc = g VRDEServer->COMSETTER(Enabled)(FALSE);2601 if (gpVRDEServer) 2602 rc = gpVRDEServer->COMSETTER(Enabled)(FALSE); 2626 2603 2627 2604 /* 2628 2605 * Get the machine state. 2629 2606 */ 2630 if (g Machine)2631 g Machine->COMGETTER(State)(&machineState);2607 if (gpMachine) 2608 gpMachine->COMGETTER(State)(&machineState); 2632 2609 else 2633 2610 machineState = MachineState_Aborted; … … 2636 2613 * Turn off the VM if it's running 2637 2614 */ 2638 if ( g Console2615 if ( gpConsole 2639 2616 && ( machineState == MachineState_Running 2640 2617 || machineState == MachineState_Teleporting … … 2645 2622 do 2646 2623 { 2647 consoleListener->getWrapped()->ignorePowerOffEvents(true);2648 ComPtr<IProgress> p rogress;2649 CHECK_ERROR_BREAK(g Console, PowerDown(progress.asOutParam()));2650 CHECK_ERROR_BREAK(p rogress, WaitForCompletion(-1));2624 pConsoleListener->getWrapped()->ignorePowerOffEvents(true); 2625 ComPtr<IProgress> pProgress; 2626 CHECK_ERROR_BREAK(gpConsole, PowerDown(pProgress.asOutParam())); 2627 CHECK_ERROR_BREAK(pProgress, WaitForCompletion(-1)); 2651 2628 BOOL completed; 2652 CHECK_ERROR_BREAK(p rogress, COMGETTER(Completed)(&completed));2629 CHECK_ERROR_BREAK(pProgress, COMGETTER(Completed)(&completed)); 2653 2630 ASSERT(completed); 2654 2631 LONG hrc; 2655 CHECK_ERROR_BREAK(p rogress, COMGETTER(ResultCode)(&hrc));2632 CHECK_ERROR_BREAK(pProgress, COMGETTER(ResultCode)(&hrc)); 2656 2633 if (FAILED(hrc)) 2657 2634 { … … 2666 2643 } while (0); 2667 2644 2668 /* unregister console listener */ 2669 if (consoleListener) 2670 { 2671 ComPtr<IEventSource> es; 2672 CHECK_ERROR(gConsole, COMGETTER(EventSource)(es.asOutParam())); 2673 CHECK_ERROR(es, UnregisterListener(consoleListener)); 2674 consoleListener->Release(); 2675 consoleListener = NULL; 2645 /* unregister Console listener */ 2646 if (pConsoleListener) 2647 { 2648 ComPtr<IEventSource> pES; 2649 CHECK_ERROR(gpConsole, COMGETTER(EventSource)(pES.asOutParam())); 2650 if (!pES.isNull()) 2651 CHECK_ERROR(pES, UnregisterListener(pConsoleListener)); 2652 pConsoleListener->Release(); 2653 pConsoleListener = NULL; 2676 2654 } 2677 2655 … … 2680 2658 * not be flushed to the permanent configuration 2681 2659 */ 2682 if ( g Machine2660 if ( gpMachine 2683 2661 && machineState != MachineState_Saved) 2684 2662 { 2685 rc = g Machine->DiscardSettings();2663 rc = gpMachine->DiscardSettings(); 2686 2664 AssertComRC(rc); 2687 2665 } … … 2690 2668 if (sessionOpened) 2691 2669 { 2692 rc = session->UnlockMachine();2670 rc = pSession->UnlockMachine(); 2693 2671 AssertComRC(rc); 2694 2672 } … … 2732 2710 2733 2711 LogFlow(("Releasing mouse, keyboard, remote desktop server, display, console...\n")); 2734 if (g Display)2712 if (gpDisplay) 2735 2713 { 2736 2714 for (unsigned i = 0; i < gcMonitors; i++) 2737 g Display->SetFramebuffer(i, NULL);2738 } 2739 2740 g Mouse = NULL;2741 g Keyboard = NULL;2742 g VRDEServer = NULL;2743 g Display = NULL;2744 g Console = NULL;2745 g MachineDebugger = NULL;2746 g Progress = NULL;2715 gpDisplay->SetFramebuffer(i, NULL); 2716 } 2717 2718 gpMouse = NULL; 2719 gpKeyboard = NULL; 2720 gpVRDEServer = NULL; 2721 gpDisplay = NULL; 2722 gpConsole = NULL; 2723 gpMachineDebugger = NULL; 2724 gpProgress = NULL; 2747 2725 // we can only uninitialize SDL here because it is not threadsafe 2748 2726 … … 2765 2743 #endif 2766 2744 2767 /* global listener unregistration. */ 2768 if (vboxListener) 2769 { 2770 ComPtr<IEventSource> es; 2771 CHECK_ERROR(virtualBox, COMGETTER(EventSource)(es.asOutParam())); 2772 CHECK_ERROR(es, UnregisterListener(vboxListener)); 2773 vboxListener->Release(); 2774 vboxListener = NULL; 2775 } 2745 /* VirtualBox (server) listener unregistration. */ 2746 if (pVBoxListener) 2747 { 2748 ComPtr<IEventSource> pES; 2749 CHECK_ERROR(pVirtualBox, COMGETTER(EventSource)(pES.asOutParam())); 2750 if (!pES.isNull()) 2751 CHECK_ERROR(pES, UnregisterListener(pVBoxListener)); 2752 pVBoxListener->Release(); 2753 pVBoxListener = NULL; 2754 } 2755 2776 2756 LogFlow(("Releasing machine, session...\n")); 2777 g Machine = NULL;2778 session = NULL;2757 gpMachine = NULL; 2758 pSession = NULL; 2779 2759 LogFlow(("Releasing VirtualBox object...\n")); 2780 virtualBox = NULL;2760 pVirtualBox = NULL; 2781 2761 2782 2762 // end "all-stuff" scope … … 3311 3291 int i; 3312 3292 3313 if (!g Keyboard)3293 if (!gpKeyboard) 3314 3294 return; 3315 3295 … … 3319 3299 { 3320 3300 if (i & 0x80) 3321 g Keyboard->PutScancode(0xe0);3322 g Keyboard->PutScancode(i | 0x80);3301 gpKeyboard->PutScancode(0xe0); 3302 gpKeyboard->PutScancode(i | 0x80); 3323 3303 gaModifiersState[i] = 0; 3324 3304 } … … 3334 3314 { 3335 3315 #if (defined(DEBUG) || defined(VBOX_WITH_STATISTICS)) && !defined(VBOX_WITH_SDL13) 3336 if (g MachineDebugger && ev->type == SDL_KEYDOWN)3316 if (gpMachineDebugger && ev->type == SDL_KEYDOWN) 3337 3317 { 3338 3318 // first handle the debugger hotkeys … … 3350 3330 case SDLK_F12: 3351 3331 RTPrintf("ResetStats\n"); /* Visual feedback in console window */ 3352 g MachineDebugger->ResetStats(NULL);3332 gpMachineDebugger->ResetStats(NULL); 3353 3333 break; 3354 3334 // pressing CTRL+ALT+F12 resets all statistics counter 3355 3335 case SDLK_F11: 3356 g MachineDebugger->DumpStats(NULL);3336 gpMachineDebugger->DumpStats(NULL); 3357 3337 RTPrintf("DumpStats\n"); /* Vistual feedback in console window */ 3358 3338 break; … … 3370 3350 { 3371 3351 BOOL recompileSupervisor; 3372 g MachineDebugger->COMGETTER(RecompileSupervisor)(&recompileSupervisor);3373 g MachineDebugger->COMSETTER(RecompileSupervisor)(!recompileSupervisor);3352 gpMachineDebugger->COMGETTER(RecompileSupervisor)(&recompileSupervisor); 3353 gpMachineDebugger->COMSETTER(RecompileSupervisor)(!recompileSupervisor); 3374 3354 break; 3375 3355 } … … 3378 3358 { 3379 3359 BOOL recompileUser; 3380 g MachineDebugger->COMGETTER(RecompileUser)(&recompileUser);3381 g MachineDebugger->COMSETTER(RecompileUser)(!recompileUser);3360 gpMachineDebugger->COMGETTER(RecompileUser)(&recompileUser); 3361 gpMachineDebugger->COMSETTER(RecompileUser)(!recompileUser); 3382 3362 break; 3383 3363 } … … 3386 3366 { 3387 3367 BOOL patmEnabled; 3388 g MachineDebugger->COMGETTER(PATMEnabled)(&patmEnabled);3389 g MachineDebugger->COMSETTER(PATMEnabled)(!patmEnabled);3368 gpMachineDebugger->COMGETTER(PATMEnabled)(&patmEnabled); 3369 gpMachineDebugger->COMSETTER(PATMEnabled)(!patmEnabled); 3390 3370 break; 3391 3371 } … … 3394 3374 { 3395 3375 BOOL csamEnabled; 3396 g MachineDebugger->COMGETTER(CSAMEnabled)(&csamEnabled);3397 g MachineDebugger->COMSETTER(CSAMEnabled)(!csamEnabled);3376 gpMachineDebugger->COMGETTER(CSAMEnabled)(&csamEnabled); 3377 gpMachineDebugger->COMSETTER(CSAMEnabled)(!csamEnabled); 3398 3378 break; 3399 3379 } … … 3402 3382 { 3403 3383 BOOL singlestepEnabled; 3404 g MachineDebugger->COMGETTER(Singlestep)(&singlestepEnabled);3405 g MachineDebugger->COMSETTER(Singlestep)(!singlestepEnabled);3384 gpMachineDebugger->COMGETTER(Singlestep)(&singlestepEnabled); 3385 gpMachineDebugger->COMSETTER(Singlestep)(!singlestepEnabled); 3406 3386 break; 3407 3387 } … … 3415 3395 { 3416 3396 BOOL logEnabled = TRUE; 3417 g MachineDebugger->COMGETTER(LogEnabled)(&logEnabled);3418 g MachineDebugger->COMSETTER(LogEnabled)(!logEnabled);3397 gpMachineDebugger->COMGETTER(LogEnabled)(&logEnabled); 3398 gpMachineDebugger->COMSETTER(LogEnabled)(!logEnabled); 3419 3399 #ifdef DEBUG_bird 3420 3400 return; … … 3438 3418 if (ev->type == SDL_KEYUP) 3439 3419 v |= 0x80; 3440 g Keyboard->PutScancode(0xe1);3441 g Keyboard->PutScancode(0x1d | v);3442 g Keyboard->PutScancode(0x45 | v);3420 gpKeyboard->PutScancode(0xe1); 3421 gpKeyboard->PutScancode(0x1d | v); 3422 gpKeyboard->PutScancode(0x45 | v); 3443 3423 return; 3444 3424 } … … 3481 3461 if (ev->type == SDL_KEYDOWN || ev->type == SDL_KEYUP) 3482 3462 { 3483 g Keyboard->PutScancode(keycode);3484 g Keyboard->PutScancode(keycode | 0x80);3463 gpKeyboard->PutScancode(keycode); 3464 gpKeyboard->PutScancode(keycode | 0x80); 3485 3465 } 3486 3466 return; … … 3503 3483 { 3504 3484 gcGuestNumLockAdaptions--; 3505 g Keyboard->PutScancode(0x45);3506 g Keyboard->PutScancode(0x45 | 0x80);3485 gpKeyboard->PutScancode(0x45); 3486 gpKeyboard->PutScancode(0x45 | 0x80); 3507 3487 } 3508 3488 if ( gcGuestCapsLockAdaptions … … 3510 3490 { 3511 3491 gcGuestCapsLockAdaptions--; 3512 g Keyboard->PutScancode(0x3a);3513 g Keyboard->PutScancode(0x3a | 0x80);3492 gpKeyboard->PutScancode(0x3a); 3493 gpKeyboard->PutScancode(0x3a | 0x80); 3514 3494 } 3515 3495 } … … 3519 3499 */ 3520 3500 if (keycode & 0x100) 3521 g Keyboard->PutScancode(0xe0);3522 3523 g Keyboard->PutScancode(ev->type == SDL_KEYUP ? (keycode & 0x7f) | 0x803501 gpKeyboard->PutScancode(0xe0); 3502 3503 gpKeyboard->PutScancode(ev->type == SDL_KEYUP ? (keycode & 0x7f) | 0x80 3524 3504 : (keycode & 0x7f)); 3525 3505 } … … 3777 3757 * or state it in PutMouseEventAbsolute() docs? 3778 3758 */ 3779 g Mouse->PutMouseEventAbsolute(x + 1 - xMin + xOrigin,3780 y + 1 - yMin + yOrigin,3781 dz, 0 /* horizontal scroll wheel */,3782 buttons | tmp_button);3759 gpMouse->PutMouseEventAbsolute(x + 1 - xMin + xOrigin, 3760 y + 1 - yMin + yOrigin, 3761 dz, 0 /* horizontal scroll wheel */, 3762 buttons | tmp_button); 3783 3763 } 3784 3764 else 3785 3765 { 3786 g Mouse->PutMouseEvent(0, 0, dz,3787 0 /* horizontal scroll wheel */,3788 buttons | tmp_button);3766 gpMouse->PutMouseEvent(0, 0, dz, 3767 0 /* horizontal scroll wheel */, 3768 buttons | tmp_button); 3789 3769 } 3790 3770 } … … 3799 3779 * or state it in PutMouseEventAbsolute() docs? 3800 3780 */ 3801 g Mouse->PutMouseEventAbsolute(x + 1 - xMin + xOrigin,3802 y + 1 - yMin + yOrigin,3803 dz, 0 /* Horizontal wheel */, buttons);3781 gpMouse->PutMouseEventAbsolute(x + 1 - xMin + xOrigin, 3782 y + 1 - yMin + yOrigin, 3783 dz, 0 /* Horizontal wheel */, buttons); 3804 3784 } 3805 3785 else 3806 3786 { 3807 g Mouse->PutMouseEvent(x, y, dz, 0 /* Horizontal wheel */, buttons);3787 gpMouse->PutMouseEvent(x, y, dz, 0 /* Horizontal wheel */, buttons); 3808 3788 } 3809 3789 } … … 3814 3794 void ResetVM(void) 3815 3795 { 3816 if (g Console)3817 g Console->Reset();3796 if (gpConsole) 3797 gpConsole->Reset(); 3818 3798 } 3819 3799 … … 3829 3809 RTThreadYield(); 3830 3810 UpdateTitlebar(TITLEBAR_SAVE); 3831 g Progress = NULL;3832 HRESULT rc = g Console->SaveState(gProgress.asOutParam());3811 gpProgress = NULL; 3812 HRESULT rc = gpConsole->SaveState(gpProgress.asOutParam()); 3833 3813 if (FAILED(rc)) 3834 3814 { … … 3836 3816 return; 3837 3817 } 3838 Assert(g Progress);3818 Assert(gpProgress); 3839 3819 3840 3820 /* … … 3847 3827 { 3848 3828 BOOL fCompleted = false; 3849 rc = g Progress->COMGETTER(Completed)(&fCompleted);3829 rc = gpProgress->COMGETTER(Completed)(&fCompleted); 3850 3830 if (FAILED(rc) || fCompleted) 3851 3831 break; 3852 3832 ULONG cPercentNow; 3853 rc = g Progress->COMGETTER(Percent)(&cPercentNow);3833 rc = gpProgress->COMGETTER(Percent)(&cPercentNow); 3854 3834 if (FAILED(rc)) 3855 3835 break; … … 3861 3841 3862 3842 /* wait */ 3863 rc = g Progress->WaitForCompletion(100);3843 rc = gpProgress->WaitForCompletion(100); 3864 3844 if (FAILED(rc)) 3865 3845 break; … … 3879 3859 */ 3880 3860 BOOL fCompleted = false; 3881 rc = g Progress->COMGETTER(Completed)(&fCompleted);3861 rc = gpProgress->COMGETTER(Completed)(&fCompleted); 3882 3862 if (FAILED(rc) || fCompleted) 3883 3863 break; 3884 3864 ULONG cPercentNow; 3885 rc = g Progress->COMGETTER(Percent)(&cPercentNow);3865 rc = gpProgress->COMGETTER(Percent)(&cPercentNow); 3886 3866 if (FAILED(rc)) 3887 3867 break; … … 3943 3923 */ 3944 3924 LONG lrc; 3945 rc = g Progress->COMGETTER(ResultCode)(&lrc);3925 rc = gpProgress->COMGETTER(ResultCode)(&lrc); 3946 3926 if (FAILED(rc)) 3947 3927 lrc = ~0; … … 3967 3947 strcpy(szPrevTitle, szTitle); 3968 3948 3969 Bstr name;3970 g Machine->COMGETTER(Name)(name.asOutParam());3949 Bstr bstrName; 3950 gpMachine->COMGETTER(Name)(bstrName.asOutParam()); 3971 3951 3972 3952 RTStrPrintf(szTitle, sizeof(szTitle), "%s - " VBOX_PRODUCT, 3973 ! name.isEmpty() ? Utf8Str(name).c_str() : "<noname>");3953 !bstrName.isEmpty() ? Utf8Str(bstrName).c_str() : "<noname>"); 3974 3954 3975 3955 /* which mode are we in? */ … … 3979 3959 { 3980 3960 MachineState_T machineState; 3981 g Machine->COMGETTER(State)(&machineState);3961 gpMachine->COMGETTER(State)(&machineState); 3982 3962 if (machineState == MachineState_Paused) 3983 3963 RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), " - [Paused]"); … … 3988 3968 #if defined(DEBUG) || defined(VBOX_WITH_STATISTICS) 3989 3969 // do we have a debugger interface 3990 if (g MachineDebugger)3970 if (gpMachineDebugger) 3991 3971 { 3992 3972 // query the machine state … … 3999 3979 BOOL hwVirtEnabled = FALSE; 4000 3980 ULONG virtualTimeRate = 100; 4001 g MachineDebugger->COMGETTER(RecompileSupervisor)(&recompileSupervisor);4002 g MachineDebugger->COMGETTER(RecompileUser)(&recompileUser);4003 g MachineDebugger->COMGETTER(PATMEnabled)(&patmEnabled);4004 g MachineDebugger->COMGETTER(CSAMEnabled)(&csamEnabled);4005 g MachineDebugger->COMGETTER(LogEnabled)(&logEnabled);4006 g MachineDebugger->COMGETTER(Singlestep)(&singlestepEnabled);4007 g MachineDebugger->COMGETTER(HWVirtExEnabled)(&hwVirtEnabled);4008 g MachineDebugger->COMGETTER(VirtualTimeRate)(&virtualTimeRate);3981 gpMachineDebugger->COMGETTER(RecompileSupervisor)(&recompileSupervisor); 3982 gpMachineDebugger->COMGETTER(RecompileUser)(&recompileUser); 3983 gpMachineDebugger->COMGETTER(PATMEnabled)(&patmEnabled); 3984 gpMachineDebugger->COMGETTER(CSAMEnabled)(&csamEnabled); 3985 gpMachineDebugger->COMGETTER(LogEnabled)(&logEnabled); 3986 gpMachineDebugger->COMGETTER(Singlestep)(&singlestepEnabled); 3987 gpMachineDebugger->COMGETTER(HWVirtExEnabled)(&hwVirtEnabled); 3988 gpMachineDebugger->COMGETTER(VirtualTimeRate)(&virtualTimeRate); 4009 3989 RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), 4010 3990 " [STEP=%d CS=%d PAT=%d RR0=%d RR3=%d LOG=%d HWVirt=%d", … … 4028 4008 */ 4029 4009 MachineState_T machineState; 4030 g Machine->COMGETTER(State)(&machineState);4010 gpMachine->COMGETTER(State)(&machineState); 4031 4011 if (machineState == MachineState_Starting) 4032 4012 RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), … … 4035 4015 { 4036 4016 ULONG cPercentNow; 4037 HRESULT rc = g Progress->COMGETTER(Percent)(&cPercentNow);4017 HRESULT rc = gpProgress->COMGETTER(Percent)(&cPercentNow); 4038 4018 if (SUCCEEDED(rc)) 4039 4019 RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), … … 4046 4026 { 4047 4027 ULONG cPercentNow; 4048 HRESULT rc = g Progress->COMGETTER(Percent)(&cPercentNow);4028 HRESULT rc = gpProgress->COMGETTER(Percent)(&cPercentNow); 4049 4029 if (SUCCEEDED(rc)) 4050 4030 RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), … … 4096 4076 4097 4077 #if 0 4098 static void vbox_show_shape 4099 4078 static void vbox_show_shape(unsigned short w, unsigned short h, 4079 uint32_t bg, const uint8_t *image) 4100 4080 { 4101 4081 size_t x, y; … … 4428 4408 gpOffCursor = NULL; 4429 4409 } 4430 if (g Mouse && UseAbsoluteMouse())4410 if (gpMouse && UseAbsoluteMouse()) 4431 4411 { 4432 4412 // Actually switch to absolute coordinates 4433 4413 if (gfGrabbed) 4434 4414 InputGrabEnd(); 4435 g Mouse->PutMouseEventAbsolute(-1, -1, 0, 0, 0);4415 gpMouse->PutMouseEventAbsolute(-1, -1, 0, 0, 0); 4436 4416 } 4437 4417 } … … 4456 4436 case SDLK_DELETE: 4457 4437 { 4458 g Keyboard->PutCAD();4438 gpKeyboard->PutCAD(); 4459 4439 break; 4460 4440 } … … 4475 4455 */ 4476 4456 MachineState_T machineState; 4477 g Machine->COMGETTER(State)(&machineState);4457 gpMachine->COMGETTER(State)(&machineState); 4478 4458 bool fPauseIt = machineState == MachineState_Running 4479 4459 || machineState == MachineState_Teleporting 4480 4460 || machineState == MachineState_LiveSnapshotting; 4481 4461 if (fPauseIt) 4482 g Console->Pause();4462 gpConsole->Pause(); 4483 4463 SetFullscreen(!gpFramebuffer[0]->getFullscreen()); 4484 4464 if (fPauseIt) 4485 g Console->Resume();4465 gpConsole->Resume(); 4486 4466 4487 4467 /* … … 4489 4469 * screen repaint, just to be sure. 4490 4470 */ 4491 g Display->InvalidateAndUpdate();4471 gpDisplay->InvalidateAndUpdate(); 4492 4472 break; 4493 4473 } … … 4502 4482 4503 4483 MachineState_T machineState; 4504 g Machine->COMGETTER(State)(&machineState);4484 gpMachine->COMGETTER(State)(&machineState); 4505 4485 if ( machineState == MachineState_Running 4506 4486 || machineState == MachineState_Teleporting … … 4510 4490 if (gfGrabbed) 4511 4491 InputGrabEnd(); 4512 g Console->Pause();4492 gpConsole->Pause(); 4513 4493 } 4514 4494 else if (machineState == MachineState_Paused) 4515 4495 { 4516 g Console->Resume();4496 gpConsole->Resume(); 4517 4497 } 4518 4498 UpdateTitlebar(TITLEBAR_NORMAL); … … 4560 4540 return VERR_NOT_SUPPORTED; 4561 4541 4562 if (g Console)4563 g Console->PowerButton();4542 if (gpConsole) 4543 gpConsole->PowerButton(); 4564 4544 break; 4565 4545 } … … 4575 4555 RTThreadYield(); 4576 4556 ULONG cSnapshots = 0; 4577 g Machine->COMGETTER(SnapshotCount)(&cSnapshots);4557 gpMachine->COMGETTER(SnapshotCount)(&cSnapshots); 4578 4558 char pszSnapshotName[20]; 4579 4559 RTStrPrintf(pszSnapshotName, sizeof(pszSnapshotName), "Snapshot %d", cSnapshots + 1); 4580 g Progress = NULL;4560 gpProgress = NULL; 4581 4561 HRESULT rc; 4582 CHECK_ERROR(g Console, TakeSnapshot(Bstr(pszSnapshotName).raw(),4583 Bstr("Taken by VBoxSDL").raw(),4584 gProgress.asOutParam()));4562 CHECK_ERROR(gpConsole, TakeSnapshot(Bstr(pszSnapshotName).raw(), 4563 Bstr("Taken by VBoxSDL").raw(), 4564 gpProgress.asOutParam())); 4585 4565 if (FAILED(rc)) 4586 4566 { … … 4597 4577 { 4598 4578 BOOL fCompleted = false; 4599 rc = g Progress->COMGETTER(Completed)(&fCompleted);4579 rc = gpProgress->COMGETTER(Completed)(&fCompleted); 4600 4580 if (FAILED(rc) || fCompleted) 4601 4581 break; 4602 4582 ULONG cPercentNow; 4603 rc = g Progress->COMGETTER(Percent)(&cPercentNow);4583 rc = gpProgress->COMGETTER(Percent)(&cPercentNow); 4604 4584 if (FAILED(rc)) 4605 4585 break; … … 4611 4591 4612 4592 /* wait */ 4613 rc = g Progress->WaitForCompletion(100);4593 rc = gpProgress->WaitForCompletion(100); 4614 4594 if (FAILED(rc)) 4615 4595 break; … … 4636 4616 keys[5] = 0x9d; // Ctrl up 4637 4617 4638 g Keyboard->PutScancodes(ComSafeArrayAsInParam(keys), NULL);4618 gpKeyboard->PutScancodes(ComSafeArrayAsInParam(keys), NULL); 4639 4619 return VINF_SUCCESS; 4640 4620 } … … 4687 4667 4688 4668 gSdlQuitTimer = NULL; 4689 if (g Console)4690 { 4691 int rc = g Console->GetPowerButtonHandled(&fHandled);4669 if (gpConsole) 4670 { 4671 int rc = gpConsole->GetPowerButtonHandled(&fHandled); 4692 4672 LogRel(("QuitTimer: rc=%d handled=%d\n", rc, fHandled)); 4693 4673 if (RT_FAILURE(rc) || !fHandled) … … 4747 4727 } 4748 4728 LogRel(("WARNING: Failed to enqueue SDL event %d.%d!\n", 4749 event->type, event->type == SDL_USEREVENT ? event->user.type : 0));4729 event->type, event->type == SDL_USEREVENT ? event->user.type : 0)); 4750 4730 return -1; 4751 4731 } … … 4823 4803 gpFramebuffer[0]->setFullscreen(enable); 4824 4804 gfIgnoreNextResize = TRUE; 4825 g Display->SetVideoModeHint(NewWidth, NewHeight, 0, 0);4805 gpDisplay->SetVideoModeHint(NewWidth, NewHeight, 0, 0); 4826 4806 } 4827 4807 }
Note:
See TracChangeset
for help on using the changeset viewer.