VirtualBox

Changeset 22165 in vbox for trunk/src/VBox/HostServices


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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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                }
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