VirtualBox

Changeset 22165 in vbox for trunk


Ignore:
Timestamp:
Aug 11, 2009 1:50:17 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50941
Message:

crOpenGL: add warning window when additions version is incompatible (#4108)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/VBoxCrOpenGLSvc.h

    r21523 r22165  
    4040#define SHCRGL_HOST_FN_SET_FRAMEBUFFER (1)
    4141#define SHCRGL_HOST_FN_SET_VISIBLE_REGION (5)
     42#define SHCRGL_HOST_FN_SET_VM (7)
    4243/* crOpenGL guest functions */
    4344#define SHCRGL_GUEST_FN_WRITE       (2)
     
    4849/* Parameters count */
    4950#define SHCRGL_CPARMS_SET_FRAMEBUFFER (1)
     51#define SHCRGL_CPARMS_SET_VM (1)
    5052#define SHCRGL_CPARMS_SET_VISIBLE_REGION (2)
    5153#define SHCRGL_CPARMS_WRITE      (1)
  • trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

    r22155 r22165  
    6060PVBOXHGCMSVCHELPERS g_pHelpers;
    6161static IFramebuffer* g_pFrameBuffer;
     62static PVM g_pVM = NULL;
    6263static ULONG64 g_winId = 0;
    6364
     
    234235{
    235236    LogRel(("SHARED_CROPENGL: unsupported client version %d.%d\n", minor, major));
    236     /*todo add warning window*/
     237
     238    /*MS's opengl32 tryes to load our ICD around 30 times on failure...this is to prevent unnecessary spam*/
     239    static int shown = 0;
     240   
     241    if (g_pVM && !shown)
     242    {
     243        VMSetRuntimeError(g_pVM, VMSETRTERR_FLAGS_NO_WAIT, "3DSupportIncompatibleAdditions",
     244        "Guest application attempt to use hardware 3D acceleration failed, because"
     245        " guest additions version doesn't match VirtualBox host version."
     246        "Please install appropriate guest additions to fix this issue");
     247        shown = 1;
     248    }
    237249}
    238250
     
    403415                if (!RT_SUCCESS(rc))
    404416                {
    405                     /*@todo, add warning window*/
    406417                    svcClientVersionUnsupported(vMajor, vMinor);
    407418                }
     
    472483                    /* Execute the function. */
    473484                    g_pFrameBuffer = pFrameBuffer;
     485                    rc = VINF_SUCCESS;
     486                }
     487            }
     488            break;
     489        }
     490        case SHCRGL_HOST_FN_SET_VM:
     491        {
     492            Log(("svcCall: SHCRGL_HOST_FN_SET_VM\n"));
     493
     494            /* Verify parameter count and types. */
     495            if (cParms != SHCRGL_CPARMS_SET_VM)
     496            {
     497                rc = VERR_INVALID_PARAMETER;
     498            }
     499            else if (paParms[0].type != VBOX_HGCM_SVC_PARM_PTR)
     500            {
     501                rc = VERR_INVALID_PARAMETER;
     502            }
     503            else
     504            {
     505                /* Fetch parameters. */
     506                PVM pVM = (PVM)paParms[0].u.pointer.addr;
     507                uint32_t  cbData = paParms[0].u.pointer.size;
     508
     509                /* Verify parameters values. */
     510                if (cbData != sizeof (PVM))
     511                {
     512                    rc = VERR_INVALID_PARAMETER;
     513                }
     514                else
     515                {
     516                    /* Execute the function. */
     517                    g_pVM = pVM;
    474518                    rc = VINF_SUCCESS;
    475519                }
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r22163 r22165  
    17901790                parm.type = VBOX_HGCM_SVC_PARM_PTR;
    17911791
    1792                 //parm.u.pointer.addr = static_cast <IConsole *> (pData->pVMMDev->getParent());
    1793                 parm.u.pointer.addr = pConsole->mVMMDev->getParent()->getDisplay()->getFramebuffer();
     1792                parm.u.pointer.addr = pConsole->getDisplay()->getFramebuffer();
    17941793                parm.u.pointer.size = sizeof(IFramebuffer *);
    17951794
     
    17971796                if (!RT_SUCCESS(rc))
    17981797                    AssertMsgFailed(("SHCRGL_HOST_FN_SET_FRAMEBUFFER failed with %Rrc\n", rc));
    1799                 }
     1798
     1799                parm.u.pointer.addr = pVM;
     1800                parm.u.pointer.size = sizeof(pVM);
     1801                rc = pConsole->mVMMDev->hgcmHostCall("VBoxSharedCrOpenGL", SHCRGL_HOST_FN_SET_VM, 1, &parm);
     1802                if (!RT_SUCCESS(rc))
     1803                    AssertMsgFailed(("SHCRGL_HOST_FN_SET_VM failed with %Rrc\n", rc));
     1804            }
     1805
    18001806        }
    18011807    }
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r22143 r22165  
    57815781          <li><tt>"HostAudioNotResponding"</tt></li>
    57825782          <li><tt>"VDIStorageFull"</tt></li>
     5783          <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
    57835784        </ul>
    57845785
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