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
c0139457
Commit
c0139457
authored
Jun 25, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Forward SetPixelFormat to opengl32 which in turn calls GdiSetPixelFormat.
parent
e9f270bd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
16 deletions
+22
-16
gdi32.spec
dlls/gdi32/gdi32.spec
+1
-1
opengl.c
dlls/gdi32/opengl.c
+15
-0
painting.c
dlls/gdi32/painting.c
+3
-12
wgl.c
dlls/opengl32/wgl.c
+3
-3
No files found.
dlls/gdi32/gdi32.spec
View file @
c0139457
...
...
@@ -214,7 +214,7 @@
@ stub GdiSetAttrs
@ stdcall GdiSetBatchLimit(long)
# @ stub GdiSetLastError
# @ stub GdiSetPixelFormat
@ stdcall GdiSetPixelFormat(long long ptr)
@ stub GdiSetServerAttr
# @ stub GdiStartDocEMF
# @ stub GdiStartPageEMF
...
...
dlls/gdi32/opengl.c
View file @
c0139457
...
...
@@ -42,6 +42,7 @@ static const WCHAR opengl32W[] = {'o','p','e','n','g','l','3','2','.','d','l','l
static
HMODULE
opengl32
;
static
INT
(
WINAPI
*
wglChoosePixelFormat
)(
HDC
,
const
PIXELFORMATDESCRIPTOR
*
);
static
INT
(
WINAPI
*
wglDescribePixelFormat
)(
HDC
,
INT
,
UINT
,
PIXELFORMATDESCRIPTOR
*
);
static
BOOL
(
WINAPI
*
wglSetPixelFormat
)(
HDC
,
INT
,
const
PIXELFORMATDESCRIPTOR
*
);
static
HDC
default_hdc
=
0
;
...
...
@@ -252,3 +253,17 @@ INT WINAPI DescribePixelFormat( HDC hdc, INT fmt, UINT size, PIXELFORMATDESCRIPT
}
return
wglDescribePixelFormat
(
hdc
,
fmt
,
size
,
pfd
);
}
/******************************************************************************
* SetPixelFormat (GDI32.@)
*/
BOOL
WINAPI
SetPixelFormat
(
HDC
hdc
,
INT
fmt
,
const
PIXELFORMATDESCRIPTOR
*
pfd
)
{
if
(
!
wglSetPixelFormat
)
{
if
(
!
opengl32
)
opengl32
=
LoadLibraryW
(
opengl32W
);
if
(
!
(
wglSetPixelFormat
=
(
void
*
)
GetProcAddress
(
opengl32
,
"wglSetPixelFormat"
)))
return
0
;
}
return
wglSetPixelFormat
(
hdc
,
fmt
,
pfd
);
}
dlls/gdi32/painting.c
View file @
c0139457
...
...
@@ -486,20 +486,11 @@ COLORREF WINAPI GetPixel( HDC hdc, INT x, INT y )
/******************************************************************************
* SetPixelFormat [GDI32.@]
* Sets pixel format of device context
* GdiSetPixelFormat [GDI32.@]
*
* PARAMS
* hdc [I] Device context to search for best pixel match
* iPixelFormat [I] Pixel format index
* ppfd [I] Pixel format for which a match is sought
*
* RETURNS
* Success: TRUE
* Failure: FALSE
* Probably not the correct semantics, it's supposed to be an internal backend for SetPixelFormat.
*/
BOOL
WINAPI
SetPixelFormat
(
HDC
hdc
,
INT
iPixelFormat
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
)
BOOL
WINAPI
GdiSetPixelFormat
(
HDC
hdc
,
INT
iPixelFormat
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
)
{
INT
bRet
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
...
...
dlls/opengl32/wgl.c
View file @
c0139457
...
...
@@ -48,7 +48,6 @@ WINE_DECLARE_DEBUG_CHANNEL(opengl);
static
struct
{
PROC
(
WINAPI
*
p_wglGetProcAddress
)(
LPCSTR
lpszProc
);
BOOL
(
WINAPI
*
p_SetPixelFormat
)(
HDC
hdc
,
INT
iPixelFormat
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
);
BOOL
(
WINAPI
*
p_wglMakeCurrent
)(
HDC
hdc
,
HGLRC
hglrc
);
HGLRC
(
WINAPI
*
p_wglCreateContext
)(
HDC
hdc
);
INT
(
WINAPI
*
p_GetPixelFormat
)(
HDC
hdc
);
...
...
@@ -88,7 +87,9 @@ static char* internal_gl_extensions = NULL;
const
GLubyte
*
WINAPI
wine_glGetString
(
GLenum
name
);
/* internal GDI functions */
extern
INT
WINAPI
GdiDescribePixelFormat
(
HDC
hdc
,
INT
fmt
,
UINT
size
,
PIXELFORMATDESCRIPTOR
*
pfd
);
extern
BOOL
WINAPI
GdiSetPixelFormat
(
HDC
hdc
,
INT
fmt
,
const
PIXELFORMATDESCRIPTOR
*
pfd
);
/***********************************************************************
* wglSetPixelFormat(OPENGL32.@)
...
...
@@ -96,7 +97,7 @@ extern INT WINAPI GdiDescribePixelFormat( HDC hdc, INT fmt, UINT size, PIXELFORM
BOOL
WINAPI
wglSetPixelFormat
(
HDC
hdc
,
INT
iPixelFormat
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
)
{
return
wine_wgl
.
p_
SetPixelFormat
(
hdc
,
iPixelFormat
,
ppfd
);
return
Gdi
SetPixelFormat
(
hdc
,
iPixelFormat
,
ppfd
);
}
/***********************************************************************
...
...
@@ -1086,7 +1087,6 @@ static BOOL process_attach(void)
wine_tsx11_unlock_ptr
=
(
void
*
)
GetProcAddress
(
mod_x11
,
"wine_tsx11_unlock"
);
wine_wgl
.
p_wglGetProcAddress
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglGetProcAddress"
);
wine_wgl
.
p_SetPixelFormat
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"SetPixelFormat"
);
wine_wgl
.
p_wglMakeCurrent
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglMakeCurrent"
);
wine_wgl
.
p_wglCreateContext
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglCreateContext"
);
wine_wgl
.
p_GetPixelFormat
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"GetPixelFormat"
);
...
...
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