Module: wine
Branch: stable
Commit: 6760e664514375ab610e57597b7cb90a464b929a
URL: https://gitlab.winehq.org/wine/wine/-/commit/6760e664514375ab610e57597b7cb9…
Author: Alex Henrie <alexhenrie24(a)gmail.com>
Date: Thu Jan 5 08:58:22 2023 -0700
winex11: Simplify confusing condition and error messages in wglShareLists.
Mathematically, ((a && b) || b) == b. Moreover, test_sharelists in
dlls/opengl32/tests/opengl.c checks that wglShareLists can share lists
from a source context that has been current.
(cherry picked from commit aa70bdb5d60d643af11feb91fe4367960f85e192)
---
dlls/winex11.drv/opengl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 96a8526604b..c44e9579cb6 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1931,14 +1931,14 @@ static BOOL glxdrv_wglShareLists(struct wgl_context *org, struct wgl_context *de
* current or when it hasn't shared display lists before.
*/
- if((org->has_been_current && dest->has_been_current) || dest->has_been_current)
+ if(dest->has_been_current)
{
- ERR("Could not share display lists, one of the contexts has been current already !\n");
+ ERR("Could not share display lists because the destination context has already been current\n");
return FALSE;
}
else if(dest->sharing)
{
- ERR("Could not share display lists because hglrc2 has already shared lists before\n");
+ ERR("Could not share display lists because the destination context has already shared lists\n");
return FALSE;
}
else