Skip to content

Commit

Permalink
Remove overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaivel committed Jul 5, 2024
1 parent 72cc399 commit 48f5475
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ Variables labeled with `host` get their values from the host/server when their o
| GL_VERSION_OVERRIDE | Digit.Digit | `host` | Override the OpenGL version on the client side. Available for both Windows and Linux clients. |
| GLX_VERSION_OVERRIDE | Digit.Digit | 1.4 | Override the GLX version on the client side. Only available for Linux clients. |
| GLSL_VERSION_OVERRIDE | Digit.Digit | 4.4 | Override the GLSL version on the client side. Available for both Windows and Linux clients. |
| GL_VENDOR_OVERRIDE | String | `host` | Override the vendor string on the client side. Available for both Windows and Linux clients. |
| GL_RENDERER_OVERRIDE | String | `host` | Override the renderer string on the client side. Available for both Windows and Linux clients. |
| SGL_NET_OVER_SHARED | Ip:Port | | If networking is enabled, this environment variable must exist on the guest. Available for both Windows and Linux clients. |
| SGL_RUN_WITH_LOW_PRIORITY | Boolean | true | On older CPUs, by setting the process priority to low / `IDLE_PRIORITY_CLASS`, applications will run smoother as the kernel driver is given more CPU time. This may not be needed on systems with newer CPUs. Only available for Windows clients. |
Expand Down
20 changes: 2 additions & 18 deletions src/client/glimpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,24 +1295,8 @@ const GLubyte *glGetString(GLenum name)
}
}

char *gl_vendor_override = getenv("GL_VENDOR_OVERRIDE");
char *gl_renderer_override = getenv("GL_RENDERER_OVERRIDE");

if (gl_vendor_override) {
if (strlen(gl_vendor_override) >= 256)
gl_vendor_override[256] = 0;
strcpy(real_vendor, gl_vendor_override);
} else {
real_glGetString(GL_VENDOR, real_vendor + 13);
}

if (gl_renderer_override) {
if (strlen(gl_renderer_override) >= 256)
gl_renderer_override[256] = 0;
strcpy(real_renderer, gl_renderer_override);
} else {
real_glGetString(GL_RENDERER, real_renderer + 15);
}
real_glGetString(GL_VENDOR, real_vendor + 13);
real_glGetString(GL_RENDERER, real_renderer + 15);
}

switch (name) {
Expand Down

0 comments on commit 48f5475

Please sign in to comment.