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
e059d565
Commit
e059d565
authored
Jun 28, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a null WGL driver.
parent
6a9dcd51
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
3 deletions
+75
-3
driver.c
dlls/gdi32/driver.c
+70
-1
opengl.c
dlls/winex11.drv/opengl.c
+5
-2
No files found.
dlls/gdi32/driver.c
View file @
e059d565
...
...
@@ -50,6 +50,7 @@ static struct list drivers = LIST_INIT( drivers );
static
struct
graphics_driver
*
display_driver
;
const
struct
gdi_dc_funcs
*
font_driver
=
NULL
;
static
const
struct
wgl_funcs
null_wgl_driver
;
static
CRITICAL_SECTION
driver_section
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
...
...
@@ -386,6 +387,11 @@ static UINT nulldrv_GetOutlineTextMetrics( PHYSDEV dev, UINT size, LPOUTLINETEXT
return
0
;
}
static
INT
nulldrv_GetPixelFormat
(
HDC
hdc
)
{
return
0
;
}
static
UINT
nulldrv_GetSystemPaletteEntries
(
PHYSDEV
dev
,
UINT
start
,
UINT
count
,
PALETTEENTRY
*
entries
)
{
return
0
;
...
...
@@ -660,11 +666,61 @@ static BOOL nulldrv_UnrealizePalette( HPALETTE palette )
return
FALSE
;
}
static
const
struct
wgl_funcs
*
nulldrv_wine_get_wgl_driver
(
PHYSDEV
dev
,
UINT
version
)
static
BOOL
nulldrv_wglCopyContext
(
HGLRC
src
,
HGLRC
dst
,
UINT
mask
)
{
return
FALSE
;
}
static
HGLRC
nulldrv_wglCreateContext
(
HDC
hdc
)
{
return
0
;
}
static
HGLRC
nulldrv_wglCreateContextAttribsARB
(
HDC
hdc
,
HGLRC
share_ctx
,
const
int
*
attribs
)
{
return
0
;
}
static
BOOL
nulldrv_wglDeleteContext
(
HGLRC
hglrc
)
{
return
FALSE
;
}
static
HDC
nulldrv_wglGetCurrentDC
(
void
)
{
return
0
;
}
static
PROC
nulldrv_wglGetProcAddress
(
LPCSTR
name
)
{
return
NULL
;
}
static
BOOL
nulldrv_wglMakeContextCurrentARB
(
HDC
draw_hdc
,
HDC
read_hdc
,
HGLRC
hglrc
)
{
return
FALSE
;
}
static
BOOL
nulldrv_wglMakeCurrent
(
HDC
hdc
,
HGLRC
hglrc
)
{
return
FALSE
;
}
static
BOOL
nulldrv_wglShareLists
(
HGLRC
org
,
HGLRC
dst
)
{
return
FALSE
;
}
static
const
struct
wgl_funcs
*
nulldrv_wine_get_wgl_driver
(
PHYSDEV
dev
,
UINT
version
)
{
if
(
version
!=
WINE_GDI_DRIVER_VERSION
)
{
ERR
(
"version mismatch, opengl32 wants %u but driver has %u
\n
"
,
version
,
WINE_GDI_DRIVER_VERSION
);
return
NULL
;
}
return
&
null_wgl_driver
;
}
const
struct
gdi_dc_funcs
null_driver
=
{
nulldrv_AbortDoc
,
/* pAbortDoc */
...
...
@@ -801,6 +857,19 @@ const struct gdi_dc_funcs null_driver =
GDI_PRIORITY_NULL_DRV
/* priority */
};
static
const
struct
wgl_funcs
null_wgl_driver
=
{
nulldrv_GetPixelFormat
,
/* p_GetPixelFormat */
nulldrv_wglCopyContext
,
/* p_wglCopyContext */
nulldrv_wglCreateContext
,
/* p_wglCreateContext */
nulldrv_wglCreateContextAttribsARB
,
/* p_wglCreateContextAttribsARB */
nulldrv_wglDeleteContext
,
/* p_wglDeleteContext */
nulldrv_wglGetCurrentDC
,
/* p_wglGetCurrentDC */
nulldrv_wglGetProcAddress
,
/* p_wglGetProcAddress */
nulldrv_wglMakeContextCurrentARB
,
/* p_wglMakeContextCurrentARB */
nulldrv_wglMakeCurrent
,
/* p_wglMakeCurrent */
nulldrv_wglShareLists
,
/* p_wglShareLists */
};
/*****************************************************************************
* DRIVER_GetDriverName
...
...
dlls/winex11.drv/opengl.c
View file @
e059d565
...
...
@@ -3444,8 +3444,11 @@ static const struct wgl_funcs * glxdrv_wine_get_wgl_driver( PHYSDEV dev, UINT ve
ERR
(
"version mismatch, opengl32 wants %u but driver has %u
\n
"
,
version
,
WINE_GDI_DRIVER_VERSION
);
return
NULL
;
}
if
(
!
has_opengl
())
return
NULL
;
return
&
glxdrv_wgl_funcs
;
if
(
has_opengl
())
return
&
glxdrv_wgl_funcs
;
dev
=
GET_NEXT_PHYSDEV
(
dev
,
wine_get_wgl_driver
);
return
dev
->
funcs
->
wine_get_wgl_driver
(
dev
,
version
);
}
static
const
struct
gdi_dc_funcs
glxdrv_funcs
=
...
...
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