VirtualBox

Changeset 98967 in vbox


Ignore:
Timestamp:
Mar 14, 2023 4:05:23 PM (21 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: A bit of fixes for audio related action restrictions; Do not check for adapter enabled if it's not even present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r98942 r98967  
    19071907    /* Audio stuff: */
    19081908    {
    1909         /* Check whether audio adapter is present & enabled: */
     1909        /* Do we need to restrict something? */
     1910        bool fRestricted = false;
     1911        /* Check whether audio adapter is present: */
    19101912        bool fAdapterPresent = false;
    1911         bool fAdapterEnabled = false;
    19121913        acquireWhetherAudioAdapterPresent(fAdapterPresent);
    1913         acquireWhetherAudioAdapterEnabled(fAdapterEnabled);
    1914         if (!fAdapterPresent || !fAdapterEnabled)
     1914        if (!fAdapterPresent)
     1915            fRestricted = true;
     1916        else
     1917        {
     1918            /* Check whether audio adapter is enabled: */
     1919            bool fAdapterEnabled = false;
     1920            acquireWhetherAudioAdapterEnabled(fAdapterEnabled);
     1921            if (!fAdapterEnabled)
     1922                fRestricted = true;
     1923        }
     1924        /* Apply restrictions: */
     1925        if (fRestricted)
    19151926            restrictionForDevices = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)
    19161927                                    (restrictionForDevices | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Audio);
Note: See TracChangeset for help on using the changeset viewer.

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