VirtualBox

Changeset 23685 in vbox for trunk/src


Ignore:
Timestamp:
Oct 12, 2009 12:32:56 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53400
Message:

video 2d accel: display a warning in VM settings UI if 2D is enabled for non-windows guests

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsDisplay.h

    r19664 r23685  
    3737    VBoxVMSettingsDisplay();
    3838
     39#ifdef VBOX_WITH_VIDEOHWACCEL
     40    bool isAcceleration2DVideoSelected() const;
     41#endif
     42
    3943protected:
    4044
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsGeneral.h

    r19837 r23685  
    3939    bool is64BitOSTypeSelected() const;
    4040
     41#ifdef VBOX_WITH_VIDEOHWACCEL
     42    bool isWindowsOSTypeSelected() const;
     43#endif
     44
    4145protected:
    4246
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp

    r23282 r23685  
    405405        mMachine.SetHWVirtExEnabled (true);
    406406
     407#ifdef VBOX_WITH_VIDEOHWACCEL
     408    /* Disable 2D Video Acceleration for non-Windows guests */
     409    if(!generalPage->isWindowsOSTypeSelected())
     410    {
     411        VBoxVMSettingsDisplay *displayPage =
     412            qobject_cast <VBoxVMSettingsDisplay*> (mSelector->idToPage (DisplayId));
     413        if(displayPage->isAcceleration2DVideoSelected())
     414        {
     415            mMachine.SetAccelerate2DVideoEnabled(false);
     416        }
     417    }
     418#endif
     419
    407420    /* Clear the "GUI_FirstRun" extra data key in case if the boot order
    408421     * and/or disk configuration were changed */
     
    529542    }
    530543
     544#ifdef VBOX_WITH_VIDEOHWACCEL
     545    /* 2D Video Acceleration is available for Windows guests only */
     546    if (aPage == mSelector->idToPage (DisplayId))
     547    {
     548        VBoxVMSettingsGeneral *generalPage =
     549            qobject_cast <VBoxVMSettingsGeneral*> (mSelector->idToPage (GeneralId));
     550        VBoxVMSettingsDisplay *displayPage =
     551            qobject_cast <VBoxVMSettingsDisplay*> (mSelector->idToPage (DisplayId));
     552        if(displayPage->isAcceleration2DVideoSelected() && !generalPage->isWindowsOSTypeSelected())
     553        {
     554            aWarning = tr (
     555                "you have Video 2D Acceleration enabled. As Video 2D Acceleration "
     556                "is supported for Windows guests only, this feature will be disabled.");
     557            return true;
     558        }
     559    }
     560#endif
     561
    531562    return true;
    532563}
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsDisplay.cpp

    r23643 r23685  
    100100}
    101101
     102#ifdef VBOX_WITH_VIDEOHWACCEL
     103bool VBoxVMSettingsDisplay::isAcceleration2DVideoSelected() const
     104{
     105    return mCb2DVideo->isChecked();
     106}
     107#endif
     108
    102109void VBoxVMSettingsDisplay::getFrom (const CMachine &aMachine)
    103110{
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp

    r21938 r23685  
    5555    return mOSTypeSelector->type().GetIs64Bit();
    5656}
     57
     58#ifdef VBOX_WITH_VIDEOHWACCEL
     59bool VBoxVMSettingsGeneral::isWindowsOSTypeSelected() const
     60{
     61    return mOSTypeSelector->type().GetFamilyId() == "Windows";
     62}
     63#endif
    5764
    5865void VBoxVMSettingsGeneral::getFrom (const CMachine &aMachine)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette