Changeset 33319 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserver
- Timestamp:
- Oct 21, 2010 5:00:14 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66897
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
r33309 r33319 72 72 73 73 static const char* gszVBoxOGLSSMMagic = "***OpenGL state data***"; 74 #define SHCROGL_SSM_VERSION 2175 74 76 75 static DECLCALLBACK(int) svcUnload (void *) … … 158 157 rc = SSMR3GetU32(pSSM, &ui32); 159 158 AssertRCReturn(rc, rc); 160 if ((SHCROGL_SSM_VERSION != ui32)161 && ((SHCROGL_SSM_VERSION!=4) || (3!=ui32)))162 {163 /*@todo: add some warning here*/164 /*@todo: in many cases saved states would be made without any opengl guest app running.165 * that means we could safely restore the default context.166 */167 rc = SSMR3SkipToEndOfUnit(pSSM);168 return rc;169 }170 159 171 160 /* The state itself */ 172 161 rc = crVBoxServerLoadState(pSSM, ui32); 162 163 if (rc==VERR_SSM_DATA_UNIT_FORMAT_CHANGED && ui32!=SHCROGL_SSM_VERSION) 164 { 165 LogRel(("SHARED_CROPENGL svcLoadState: unsupported save state version %d\n", ui32)); 166 167 /*@todo ugly hack, as we don't know size of stored opengl data try to read untill end of opengl data marker*/ 168 /*VboxSharedCrOpenGL isn't last hgcm service now, so can't use SSMR3SkipToEndOfUnit*/ 169 { 170 const char *pMatch = &gszVBoxOGLSSMMagic[0]; 171 char current; 172 173 while (*pMatch) 174 { 175 rc = SSMR3GetS8(pSSM, (int8_t*)¤t); 176 AssertRCReturn(rc, rc); 177 178 if (current==*pMatch) 179 { 180 pMatch++; 181 } 182 else 183 { 184 pMatch = &gszVBoxOGLSSMMagic[0]; 185 } 186 } 187 } 188 189 return VINF_SUCCESS; 190 } 173 191 AssertRCReturn(rc, rc); 174 192
Note:
See TracChangeset
for help on using the changeset viewer.