summaryrefslogtreecommitdiff
path: root/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2019-11-18 20:42:02 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2019-11-18 20:42:02 +0000
commit46cc920be8c1cf6dbcb0f65eb388ee4dde3cdb70 (patch)
tree9dd0c5a2f62fe7a8dba2e67e5c1fc97f6764d533 /src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
parentf9a0939ee1afad863165b08a95fc7b2965d7bd06 (diff)
downloadVirtualBox-svn-46cc920be8c1cf6dbcb0f65eb388ee4dde3cdb70.tar.gz
Main/GraphicsAdapter: Split off a few attributes from Machine interface, which affects quite a few other interfaces.
Frontends/VirtualBox+VBoxManage+VBoxSDL+VBoxShell: Adapt accordingly. git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@81964 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp')
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
index ebf38fa7eab..a2c5cae9fc3 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
@@ -557,6 +557,9 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
ComPtr<IBIOSSettings> biosSettings;
sessionMachine->COMGETTER(BIOSSettings)(biosSettings.asOutParam());
+ ComPtr<IGraphicsAdapter> pGraphicsAdapter;
+ sessionMachine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam());
+
RTGETOPTSTATE GetOptState;
RTGetOptInit(&GetOptState, a->argc, a->argv, g_aModifyVMOptions,
RT_ELEMENTS(g_aModifyVMOptions), 1, RTGETOPTINIT_FLAGS_NO_STD_OPTS);
@@ -641,7 +644,7 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
case MODIFYVM_VRAM:
{
- CHECK_ERROR(sessionMachine, COMSETTER(VRAMSize)(ValueUnion.u32));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(VRAMSize)(ValueUnion.u32));
break;
}
@@ -891,19 +894,19 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
{
if ( !RTStrICmp(ValueUnion.psz, "none")
|| !RTStrICmp(ValueUnion.psz, "disabled"))
- CHECK_ERROR(sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_Null));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_Null));
else if ( !RTStrICmp(ValueUnion.psz, "vboxvga")
|| !RTStrICmp(ValueUnion.psz, "vbox")
|| !RTStrICmp(ValueUnion.psz, "vga")
|| !RTStrICmp(ValueUnion.psz, "vesa"))
- CHECK_ERROR(sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxVGA));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxVGA));
#ifdef VBOX_WITH_VMSVGA
else if ( !RTStrICmp(ValueUnion.psz, "vmsvga")
|| !RTStrICmp(ValueUnion.psz, "vmware"))
- CHECK_ERROR(sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VMSVGA));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VMSVGA));
else if ( !RTStrICmp(ValueUnion.psz, "vboxsvga")
|| !RTStrICmp(ValueUnion.psz, "svga"))
- CHECK_ERROR(sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxSVGA));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxSVGA));
#endif
else
{
@@ -915,20 +918,20 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
case MODIFYVM_MONITORCOUNT:
{
- CHECK_ERROR(sessionMachine, COMSETTER(MonitorCount)(ValueUnion.u32));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(MonitorCount)(ValueUnion.u32));
break;
}
case MODIFYVM_ACCELERATE3D:
{
- CHECK_ERROR(sessionMachine, COMSETTER(Accelerate3DEnabled)(ValueUnion.f));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(Accelerate3DEnabled)(ValueUnion.f));
break;
}
#ifdef VBOX_WITH_VIDEOHWACCEL
case MODIFYVM_ACCELERATE2DVIDEO:
{
- CHECK_ERROR(sessionMachine, COMSETTER(Accelerate2DVideoEnabled)(ValueUnion.f));
+ CHECK_ERROR(pGraphicsAdapter, COMSETTER(Accelerate2DVideoEnabled)(ValueUnion.f));
break;
}
#endif
@@ -3005,7 +3008,7 @@ RTEXITCODE handleModifyVM(HandlerArg *a)
case MODIFYVM_RECORDING_SCREENS:
{
ULONG cMonitors = 64;
- CHECK_ERROR(sessionMachine, COMGETTER(MonitorCount)(&cMonitors));
+ CHECK_ERROR(pGraphicsAdapter, COMGETTER(MonitorCount)(&cMonitors));
com::SafeArray<BOOL> screens(cMonitors);
if (parseScreens(ValueUnion.psz, &screens))
{