Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b2f33ffb
Commit
b2f33ffb
authored
Dec 19, 2006
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Dec 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Don't crash when called with a NULL gl context.
parent
7329144c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
14 deletions
+26
-14
opengl.c
dlls/winex11.drv/opengl.c
+26
-14
No files found.
dlls/winex11.drv/opengl.c
View file @
b2f33ffb
...
@@ -1795,7 +1795,9 @@ static void WINAPI X11DRV_wglDisable(GLenum cap)
...
@@ -1795,7 +1795,9 @@ static void WINAPI X11DRV_wglDisable(GLenum cap)
if
(
cap
==
GL_SCISSOR_TEST
)
if
(
cap
==
GL_SCISSOR_TEST
)
{
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
ctx
->
scissor_enabled
=
FALSE
;
if
(
ctx
)
ctx
->
scissor_enabled
=
FALSE
;
}
}
else
else
{
{
...
@@ -1810,7 +1812,9 @@ static void WINAPI X11DRV_wglEnable(GLenum cap)
...
@@ -1810,7 +1812,9 @@ static void WINAPI X11DRV_wglEnable(GLenum cap)
if
(
cap
==
GL_SCISSOR_TEST
)
if
(
cap
==
GL_SCISSOR_TEST
)
{
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
ctx
->
scissor_enabled
=
TRUE
;
if
(
ctx
)
ctx
->
scissor_enabled
=
TRUE
;
}
}
else
else
{
{
...
@@ -1861,12 +1865,14 @@ static void WINAPI X11DRV_wglGetIntegerv(GLenum pname, GLint* params)
...
@@ -1861,12 +1865,14 @@ static void WINAPI X11DRV_wglGetIntegerv(GLenum pname, GLint* params)
static
GLboolean
WINAPI
X11DRV_wglIsEnabled
(
GLenum
cap
)
static
GLboolean
WINAPI
X11DRV_wglIsEnabled
(
GLenum
cap
)
{
{
GLboolean
enabled
;
GLboolean
enabled
=
False
;
if
(
cap
==
GL_SCISSOR_TEST
)
if
(
cap
==
GL_SCISSOR_TEST
)
{
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
enabled
=
ctx
->
scissor_enabled
;
if
(
ctx
)
enabled
=
ctx
->
scissor_enabled
;
}
}
else
else
{
{
...
@@ -1881,24 +1887,30 @@ static void WINAPI X11DRV_wglScissor(GLint x, GLint y, GLsizei width, GLsizei he
...
@@ -1881,24 +1887,30 @@ static void WINAPI X11DRV_wglScissor(GLint x, GLint y, GLsizei width, GLsizei he
{
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
ctx
->
scissor
.
left
=
x
;
if
(
ctx
)
ctx
->
scissor
.
top
=
y
;
{
ctx
->
scissor
.
right
=
x
+
width
;
ctx
->
scissor
.
left
=
x
;
ctx
->
scissor
.
bottom
=
y
+
height
;
ctx
->
scissor
.
top
=
y
;
ctx
->
scissor
.
right
=
x
+
width
;
ctx
->
scissor
.
bottom
=
y
+
height
;
sync_current_drawable
(
TRUE
);
sync_current_drawable
(
TRUE
);
}
}
}
static
void
WINAPI
X11DRV_wglViewport
(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
)
static
void
WINAPI
X11DRV_wglViewport
(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
)
{
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
NtCurrentTeb
()
->
glContext
;
ctx
->
viewport
.
left
=
x
;
if
(
ctx
)
ctx
->
viewport
.
top
=
y
;
{
ctx
->
viewport
.
right
=
x
+
width
;
ctx
->
viewport
.
left
=
x
;
ctx
->
viewport
.
bottom
=
y
+
height
;
ctx
->
viewport
.
top
=
y
;
ctx
->
viewport
.
right
=
x
+
width
;
ctx
->
viewport
.
bottom
=
y
+
height
;
sync_current_drawable
(
TRUE
);
sync_current_drawable
(
TRUE
);
}
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment