Changeset 62201 in vbox for trunk/src/VBox/Additions/common/crOpenGL
- Timestamp:
- Jul 12, 2016 2:14:55 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/egl.c
r62074 r62201 29 29 #include <GL/glx.h> 30 30 #include <X11/Xlib.h> 31 32 #include <stdlib.h> 31 33 32 34 /******************************************************************************* … … 133 135 Display *pDisplay; 134 136 int rc, cError, cEvent, cMajor, cMinor; 135 137 /* Prevent working from inside the X server by requiring a valid DISPLAY. */ 138 char *pszDisplay = getenv("DISPLAY"); 139 140 if (!pszDisplay || !*pszDisplay) 141 return EGL_NO_DISPLAY; 136 142 rc = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE); 137 143 if (RT_FAILURE(rc)) … … 164 170 DECLEXPORT(EGLBoolean) eglInitialize (EGLDisplay hDisplay, EGLint *pcMajor, EGLint *pcMinor) 165 171 { 172 /* Prevent working from inside the X server by requiring a valid DISPLAY. */ 173 char *pszDisplay = getenv("DISPLAY"); 174 175 if (!pszDisplay || !*pszDisplay) 176 return EGL_FALSE; 166 177 if (!VALID_PTR(hDisplay)) 167 178 return setEGLError(EGL_BAD_DISPLAY); … … 730 741 DECLEXPORT(EGLBoolean) eglBindAPI(EGLenum enmApi) 731 742 { 743 /* Prevent working from inside the X server by requiring a valid DISPLAY. */ 744 char *pszDisplay = getenv("DISPLAY"); 745 746 if (!pszDisplay || !*pszDisplay) 747 return EGL_FALSE; 732 748 return enmApi == EGL_OPENGL_API ? clearEGLError() : setEGLError(EGL_BAD_PARAMETER); 733 749 }
Note:
See TracChangeset
for help on using the changeset viewer.