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
131de4bb
Commit
131de4bb
authored
Aug 09, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use RtlSetLastWin32Error.
parent
1dfedae9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
34 deletions
+34
-34
desktop.c
dlls/winex11.drv/desktop.c
+1
-1
display.c
dlls/winex11.drv/display.c
+2
-2
graphics.c
dlls/winex11.drv/graphics.c
+1
-1
keyboard.c
dlls/winex11.drv/keyboard.c
+2
-2
opengl.c
dlls/winex11.drv/opengl.c
+25
-25
xrandr.c
dlls/winex11.drv/xrandr.c
+1
-1
xrender.c
dlls/winex11.drv/xrender.c
+1
-1
xvidmode.c
dlls/winex11.drv/xvidmode.c
+1
-1
No files found.
dlls/winex11.drv/desktop.c
View file @
131de4bb
...
...
@@ -162,7 +162,7 @@ static BOOL X11DRV_desktop_get_modes( ULONG_PTR id, DWORD flags, DEVMODEW **new_
/* Allocate memory for modes in different color depths */
if
(
!
(
modes
=
calloc
(
(
ARRAY_SIZE
(
screen_sizes
)
+
2
)
*
DEPTH_COUNT
,
sizeof
(
*
modes
)))
)
{
SetLast
Error
(
ERROR_NOT_ENOUGH_MEMORY
);
RtlSetLastWin32
Error
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
...
...
dlls/winex11.drv/display.c
View file @
131de4bb
...
...
@@ -91,7 +91,7 @@ static BOOL nores_get_modes(ULONG_PTR id, DWORD flags, DEVMODEW **new_modes, UIN
modes
=
calloc
(
1
,
sizeof
(
*
modes
));
if
(
!
modes
)
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
RtlSetLastWin32Error
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
...
...
@@ -350,7 +350,7 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW
{
pthread_mutex_unlock
(
&
settings_mutex
);
WARN
(
"handler:%s device:%s mode index:%#x not found.
\n
"
,
settings_handler
.
name
,
wine_dbgstr_w
(
name
),
n
);
SetLastError
(
ERROR_NO_MORE_FILES
);
RtlSetLastWin32Error
(
ERROR_NO_MORE_FILES
);
return
FALSE
;
}
...
...
dlls/winex11.drv/graphics.c
View file @
131de4bb
...
...
@@ -1736,7 +1736,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size,
if
(
*
size
<
required
)
{
*
size
=
required
;
SetLast
Error
(
ERROR_INSUFFICIENT_BUFFER
);
RtlSetLastWin32
Error
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
if
(
filename
)
...
...
dlls/winex11.drv/keyboard.c
View file @
131de4bb
...
...
@@ -1857,14 +1857,14 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
if
(
flags
&
KLF_SETFORPROCESS
)
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
RtlSetLastWin32Error
(
ERROR_CALL_NOT_IMPLEMENTED
);
FIXME
(
"KLF_SETFORPROCESS not supported
\n
"
);
return
FALSE
;
}
if
(
!
match_x11_keyboard_layout
(
hkl
))
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
RtlSetLastWin32Error
(
ERROR_CALL_NOT_IMPLEMENTED
);
FIXME
(
"setting keyboard of different locales not supported
\n
"
);
return
FALSE
;
}
...
...
dlls/winex11.drv/opengl.c
View file @
131de4bb
...
...
@@ -1739,7 +1739,7 @@ static struct wgl_context * WINAPI glxdrv_wglCreateContext( HDC hdc )
if
(
!
(
gl
=
get_gl_drawable
(
NtUserWindowFromDC
(
hdc
),
hdc
)))
{
SetLast
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
RtlSetLastWin32
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
return
NULL
;
}
...
...
@@ -1833,7 +1833,7 @@ static BOOL WINAPI glxdrv_wglMakeCurrent(HDC hdc, struct wgl_context *ctx)
if
(
ctx
->
fmt
!=
gl
->
format
)
{
WARN
(
"mismatched pixel format hdc %p %p ctx %p %p
\n
"
,
hdc
,
gl
->
format
,
ctx
,
ctx
->
fmt
);
SetLast
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
RtlSetLastWin32
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
goto
done
;
}
...
...
@@ -1854,7 +1854,7 @@ static BOOL WINAPI glxdrv_wglMakeCurrent(HDC hdc, struct wgl_context *ctx)
}
pthread_mutex_unlock
(
&
context_mutex
);
}
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
done:
release_gl_drawable
(
gl
);
...
...
@@ -1900,7 +1900,7 @@ static BOOL X11DRV_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct
}
pthread_mutex_unlock
(
&
context_mutex
);
}
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
done:
release_gl_drawable
(
read_gl
);
release_gl_drawable
(
draw_gl
);
...
...
@@ -2027,7 +2027,7 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg
if
(
!
(
gl
=
get_gl_drawable
(
NtUserWindowFromDC
(
hdc
),
hdc
)))
{
SetLast
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
RtlSetLastWin32
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
return
NULL
;
}
...
...
@@ -2143,13 +2143,13 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
fmt
=
get_pixel_format
(
gdi_display
,
iPixelFormat
,
TRUE
/* Offscreen */
);
if
(
!
fmt
)
{
ERR
(
"(%p): invalid pixel format %d
\n
"
,
hdc
,
iPixelFormat
);
SetLast
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
RtlSetLastWin32
Error
(
ERROR_INVALID_PIXEL_FORMAT
);
return
NULL
;
}
object
=
calloc
(
1
,
sizeof
(
*
object
)
);
if
(
NULL
==
object
)
{
SetLast
Error
(
ERROR_NO_SYSTEM_RESOURCES
);
RtlSetLastWin32
Error
(
ERROR_NO_SYSTEM_RESOURCES
);
return
NULL
;
}
object
->
width
=
iWidth
;
...
...
@@ -2177,7 +2177,7 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
object
->
use_render_texture
=
0
;
}
else
{
if
(
!
use_render_texture_emulation
)
{
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
goto
create_failed
;
}
switch
(
attr_v
)
{
...
...
@@ -2221,7 +2221,7 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
break
;
default:
ERR
(
"Unknown texture format: %x
\n
"
,
attr_v
);
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
goto
create_failed
;
}
}
...
...
@@ -2236,13 +2236,13 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
object
->
texture_target
=
0
;
}
else
{
if
(
!
use_render_texture_emulation
)
{
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
goto
create_failed
;
}
switch
(
attr_v
)
{
case
WGL_TEXTURE_CUBE_MAP_ARB
:
{
if
(
iWidth
!=
iHeight
)
{
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
goto
create_failed
;
}
object
->
texture_target
=
GL_TEXTURE_CUBE_MAP
;
...
...
@@ -2251,7 +2251,7 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
}
case
WGL_TEXTURE_1D_ARB
:
{
if
(
1
!=
iHeight
)
{
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
goto
create_failed
;
}
object
->
texture_target
=
GL_TEXTURE_1D
;
...
...
@@ -2270,7 +2270,7 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
}
default:
ERR
(
"Unknown texture target: %x
\n
"
,
attr_v
);
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
goto
create_failed
;
}
}
...
...
@@ -2282,7 +2282,7 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
attr_v
=
*
piAttribList
;
TRACE
(
"WGL_render_texture Attribute: WGL_MIPMAP_TEXTURE_ARB as %x
\n
"
,
attr_v
);
if
(
!
use_render_texture_emulation
)
{
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
goto
create_failed
;
}
break
;
...
...
@@ -2294,7 +2294,7 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
PUSH1
(
attribs
,
None
);
if
(
!
(
object
->
gl
=
calloc
(
1
,
sizeof
(
*
object
->
gl
)
)))
{
SetLast
Error
(
ERROR_NO_SYSTEM_RESOURCES
);
RtlSetLastWin32
Error
(
ERROR_NO_SYSTEM_RESOURCES
);
goto
create_failed
;
}
object
->
gl
->
type
=
DC_GL_PBUFFER
;
...
...
@@ -2305,7 +2305,7 @@ static struct wgl_pbuffer *X11DRV_wglCreatePbufferARB( HDC hdc, int iPixelFormat
TRACE
(
"new Pbuffer drawable as %p (%lx)
\n
"
,
object
->
gl
,
object
->
gl
->
drawable
);
if
(
!
object
->
gl
->
drawable
)
{
free
(
object
->
gl
);
SetLast
Error
(
ERROR_NO_SYSTEM_RESOURCES
);
RtlSetLastWin32
Error
(
ERROR_NO_SYSTEM_RESOURCES
);
goto
create_failed
;
/* unexpected error */
}
pthread_mutex_lock
(
&
context_mutex
);
...
...
@@ -2400,7 +2400,7 @@ static BOOL X11DRV_wglQueryPbufferARB( struct wgl_pbuffer *object, int iAttribut
*
piValue
=
WGL_NO_TEXTURE_ARB
;
}
else
{
if
(
!
use_render_texture_emulation
)
{
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
return
GL_FALSE
;
}
switch
(
object
->
use_render_texture
)
{
...
...
@@ -2434,7 +2434,7 @@ static BOOL X11DRV_wglQueryPbufferARB( struct wgl_pbuffer *object, int iAttribut
*
piValue
=
WGL_NO_TEXTURE_ARB
;
}
else
{
if
(
!
use_render_texture_emulation
)
{
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
return
GL_FALSE
;
}
switch
(
object
->
texture_target
)
{
...
...
@@ -2496,7 +2496,7 @@ static BOOL X11DRV_wglSetPbufferAttribARB( struct wgl_pbuffer *object, const int
WARN
(
"(%p, %p): alpha-testing, report any problem
\n
"
,
object
,
piAttribList
);
if
(
!
object
->
use_render_texture
)
{
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
return
GL_FALSE
;
}
if
(
use_render_texture_emulation
)
{
...
...
@@ -2976,7 +2976,7 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer )
TRACE
(
"(%p, %d)
\n
"
,
object
,
iBuffer
);
if
(
!
object
->
use_render_texture
)
{
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
return
GL_FALSE
;
}
...
...
@@ -3036,7 +3036,7 @@ static BOOL X11DRV_wglReleaseTexImageARB( struct wgl_pbuffer *object, int iBuffe
TRACE
(
"(%p, %d)
\n
"
,
object
,
iBuffer
);
if
(
!
object
->
use_render_texture
)
{
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
return
GL_FALSE
;
}
if
(
use_render_texture_emulation
)
{
...
...
@@ -3102,13 +3102,13 @@ static BOOL X11DRV_wglSwapIntervalEXT(int interval)
*/
if
(
interval
<
0
&&
!
has_swap_control_tear
)
{
SetLast
Error
(
ERROR_INVALID_DATA
);
RtlSetLastWin32
Error
(
ERROR_INVALID_DATA
);
return
FALSE
;
}
if
(
!
(
gl
=
get_gl_drawable
(
NtUserWindowFromDC
(
ctx
->
hdc
),
ctx
->
hdc
)))
{
SetLast
Error
(
ERROR_DC_NOT_FOUND
);
RtlSetLastWin32
Error
(
ERROR_DC_NOT_FOUND
);
return
FALSE
;
}
...
...
@@ -3118,7 +3118,7 @@ static BOOL X11DRV_wglSwapIntervalEXT(int interval)
if
(
ret
)
gl
->
swap_interval
=
interval
;
else
SetLast
Error
(
ERROR_DC_NOT_FOUND
);
RtlSetLastWin32
Error
(
ERROR_DC_NOT_FOUND
);
pthread_mutex_unlock
(
&
context_mutex
);
release_gl_drawable
(
gl
);
...
...
@@ -3334,7 +3334,7 @@ static BOOL WINAPI glxdrv_wglSwapBuffers( HDC hdc )
if
(
!
(
gl
=
get_gl_drawable
(
NtUserWindowFromDC
(
hdc
),
hdc
)))
{
SetLast
Error
(
ERROR_INVALID_HANDLE
);
RtlSetLastWin32
Error
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
...
...
dlls/winex11.drv/xrandr.c
View file @
131de4bb
...
...
@@ -204,7 +204,7 @@ static BOOL xrandr10_get_modes( ULONG_PTR id, DWORD flags, DEVMODEW **new_modes,
modes
=
calloc
(
mode_count
*
DEPTH_COUNT
,
sizeof
(
*
modes
)
+
sizeof
(
SizeID
)
);
if
(
!
modes
)
{
SetLast
Error
(
ERROR_NOT_ENOUGH_MEMORY
);
RtlSetLastWin32
Error
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
...
...
dlls/winex11.drv/xrender.c
View file @
131de4bb
...
...
@@ -1941,7 +1941,7 @@ static BOOL CDECL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *
if
((
blendfn
.
AlphaFormat
&
AC_SRC_ALPHA
)
&&
physdev_src
->
format
!=
WXR_FORMAT_A8R8G8B8
)
{
SetLast
Error
(
ERROR_INVALID_PARAMETER
);
RtlSetLastWin32
Error
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
dlls/winex11.drv/xvidmode.c
View file @
131de4bb
...
...
@@ -140,7 +140,7 @@ static BOOL xf86vm_get_modes(ULONG_PTR id, DWORD flags, DEVMODEW **new_modes, UI
ptr
=
calloc
(
1
,
size
);
if
(
!
ptr
)
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
RtlSetLastWin32Error
(
ERROR_NOT_ENOUGH_MEMORY
);
return
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