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
2f5c985e
Commit
2f5c985e
authored
Oct 06, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Use RtlSetLastWin32Error instead of SetLastError.
parent
613bed53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
unix_wgl.c
dlls/opengl32/unix_wgl.c
+10
-10
No files found.
dlls/opengl32/unix_wgl.c
View file @
2f5c985e
...
...
@@ -104,7 +104,7 @@ static struct wgl_handle *get_handle_ptr( HANDLE handle, enum wgl_handle_type ty
if
(
index
<
handle_count
&&
ULongToHandle
(
wgl_handles
[
index
].
handle
)
==
handle
)
return
&
wgl_handles
[
index
];
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
return
NULL
;
}
...
...
@@ -124,7 +124,7 @@ static HANDLE alloc_handle( enum wgl_handle_type type, struct opengl_funcs *func
ptr
->
u
.
context
=
user_ptr
;
handle
=
next_handle
(
ptr
,
type
);
}
else
SetLast
Error
(
ERROR_NOT_ENOUGH_MEMORY
);
else
RtlSetLastWin32
Error
(
ERROR_NOT_ENOUGH_MEMORY
);
return
handle
;
}
...
...
@@ -545,7 +545,7 @@ static BOOL wrap_wglCopyContext( HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask )
if
(
!
(
src
=
get_handle_ptr
(
hglrcSrc
,
HANDLE_CONTEXT
)))
return
FALSE
;
if
((
dst
=
get_handle_ptr
(
hglrcDst
,
HANDLE_CONTEXT
)))
{
if
(
src
->
funcs
!=
dst
->
funcs
)
SetLast
Error
(
ERROR_INVALID_HANDLE
);
if
(
src
->
funcs
!=
dst
->
funcs
)
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
else
ret
=
src
->
funcs
->
wgl
.
p_wglCopyContext
(
src
->
u
.
context
->
drv_ctx
,
dst
->
u
.
context
->
drv_ctx
,
mask
);
}
return
ret
;
...
...
@@ -592,7 +592,7 @@ static BOOL wrap_wglMakeCurrent( HDC hdc, HGLRC hglrc )
}
else
{
SetLast
Error
(
ERROR_BUSY
);
RtlSetLastWin32
Error
(
ERROR_BUSY
);
ret
=
FALSE
;
}
}
...
...
@@ -605,7 +605,7 @@ static BOOL wrap_wglMakeCurrent( HDC hdc, HGLRC hglrc )
}
else
if
(
!
hdc
)
{
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
ret
=
FALSE
;
}
return
ret
;
...
...
@@ -618,7 +618,7 @@ static BOOL wrap_wglDeleteContext( HGLRC hglrc )
if
(
!
(
ptr
=
get_handle_ptr
(
hglrc
,
HANDLE_CONTEXT
)))
return
FALSE
;
if
(
ptr
->
u
.
context
->
tid
&&
ptr
->
u
.
context
->
tid
!=
GetCurrentThreadId
())
{
SetLast
Error
(
ERROR_BUSY
);
RtlSetLastWin32
Error
(
ERROR_BUSY
);
return
FALSE
;
}
if
(
hglrc
==
NtCurrentTeb
()
->
glCurrentRC
)
wrap_wglMakeCurrent
(
0
,
0
);
...
...
@@ -638,7 +638,7 @@ static BOOL wrap_wglShareLists( HGLRC hglrcSrc, HGLRC hglrcDst )
if
(
!
(
src
=
get_handle_ptr
(
hglrcSrc
,
HANDLE_CONTEXT
)))
return
FALSE
;
if
((
dst
=
get_handle_ptr
(
hglrcDst
,
HANDLE_CONTEXT
)))
{
if
(
src
->
funcs
!=
dst
->
funcs
)
SetLast
Error
(
ERROR_INVALID_HANDLE
);
if
(
src
->
funcs
!=
dst
->
funcs
)
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
else
ret
=
src
->
funcs
->
wgl
.
p_wglShareLists
(
src
->
u
.
context
->
drv_ctx
,
dst
->
u
.
context
->
drv_ctx
);
}
return
ret
;
...
...
@@ -661,13 +661,13 @@ static HGLRC wrap_wglCreateContextAttribsARB( HDC hdc, HGLRC share, const int *a
if
(
!
funcs
)
{
SetLast
Error
(
ERROR_DC_NOT_FOUND
);
RtlSetLastWin32
Error
(
ERROR_DC_NOT_FOUND
);
return
0
;
}
if
(
!
funcs
->
ext
.
p_wglCreateContextAttribsARB
)
return
0
;
if
(
share
&&
!
(
share_ptr
=
get_handle_ptr
(
share
,
HANDLE_CONTEXT
)))
{
SetLast
Error
(
ERROR_INVALID_OPERATION
);
RtlSetLastWin32
Error
(
ERROR_INVALID_OPERATION
);
return
0
;
}
if
((
drv_ctx
=
funcs
->
ext
.
p_wglCreateContextAttribsARB
(
hdc
,
share_ptr
?
share_ptr
->
u
.
context
->
drv_ctx
:
NULL
,
attribs
)))
...
...
@@ -752,7 +752,7 @@ static BOOL wrap_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, HGLRC hgl
}
else
{
SetLast
Error
(
ERROR_BUSY
);
RtlSetLastWin32
Error
(
ERROR_BUSY
);
ret
=
FALSE
;
}
}
...
...
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