Module: wine Branch: master Commit: f82a5b610f0278450f7213c717e022c8206cfa86 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f82a5b610f0278450f7213c71...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Apr 3 10:47:00 2020 +0200
winex11: Avoid using wine_get/set_fs().
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winex11.drv/opengl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 7fb97f5f44..119da425d9 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -440,12 +440,14 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void) vis = pglXChooseVisual(gdi_display, screen, attribList); if (vis) { #ifdef __i386__ - WORD old_fs = wine_get_fs(); + WORD old_fs, new_fs; + __asm__( "mov %%fs,%0" : "=r" (old_fs) ); /* Create a GLX Context. Without one we can't query GL information */ ctx = pglXCreateContext(gdi_display, vis, None, GL_TRUE); - if (wine_get_fs() != old_fs) + __asm__( "mov %%fs,%0" : "=r" (new_fs) ); + __asm__( "mov %0,%%fs" :: "r" (old_fs) ); + if (old_fs != new_fs) { - wine_set_fs( old_fs ); ERR( "%%fs register corrupted, probably broken ATI driver, disabling OpenGL.\n" ); ERR( "You need to set the "UseFastTls" option to "2" in your X config file.\n" ); goto done;