VirtualBox

Ignore:
Timestamp:
Aug 5, 2009 12:28:09 PM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: fix 3d failure after snapshot loading

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

    r21624 r21990  
    7070
    7171static const char* gszVBoxOGLSSMMagic = "***OpenGL state data***";
    72 #define SHCROGL_SSM_VERSION 3
     72#define SHCROGL_SSM_VERSION 4
    7373
    7474typedef struct
     
    207207    rc = SSMR3GetU32(pSSM, &ui32);
    208208    AssertRCReturn(rc, rc);
    209     if (SHCROGL_SSM_VERSION != ui32)
     209    if ((SHCROGL_SSM_VERSION != ui32)
     210        && (3 != ui32))
    210211        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
    211212
    212213    /* The state itself */
    213     rc = crVBoxServerLoadState(pSSM);
     214    rc = crVBoxServerLoadState(pSSM, ui32);
    214215    AssertRCReturn(rc, rc);
    215216
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r21523 r21990  
    709709            AssertRCReturn(rc, rc);
    710710
     711            rc = SSMR3PutU32(pSSM, pClient->conn->vMajor);
     712            AssertRCReturn(rc, rc);
     713
     714            rc = SSMR3PutU32(pSSM, pClient->conn->vMinor);
     715            AssertRCReturn(rc, rc);
     716
    711717            rc = SSMR3PutMem(pSSM, pClient, sizeof(*pClient));
    712718            AssertRCReturn(rc, rc);
     
    735741}
    736742
    737 DECLEXPORT(int32_t) crVBoxServerLoadState(PSSMHANDLE pSSM)
     743DECLEXPORT(int32_t) crVBoxServerLoadState(PSSMHANDLE pSSM, uint32_t version)
    738744{
    739745    int32_t  rc, i;
     
    859865            /* If this assert fires, then we should search correct client in the list first*/
    860866            CRASSERT(ui == pClient->conn->u32ClientID);
     867
     868            if (version>=4)
     869            {
     870                rc = SSMR3GetU32(pSSM, &pClient->conn->vMajor);
     871                AssertRCReturn(rc, rc);
     872
     873                rc = SSMR3GetU32(pSSM, &pClient->conn->vMinor);
     874                AssertRCReturn(rc, rc);
     875            }
    861876
    862877            rc = SSMR3GetMem(pSSM, &client, sizeof(client));
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