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
5390628e
Commit
5390628e
authored
Mar 27, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make sure the format actually exists in init_format_texture_info().
parent
837f1636
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
utils.c
dlls/wined3d/utils.c
+15
-2
No files found.
dlls/wined3d/utils.c
View file @
5390628e
...
...
@@ -429,7 +429,7 @@ static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_form
return
status
==
GL_FRAMEBUFFER_COMPLETE_EXT
;
}
static
void
init_format_texture_info
(
WineD3D_GL_Info
*
gl_info
)
static
BOOL
init_format_texture_info
(
WineD3D_GL_Info
*
gl_info
)
{
unsigned
int
i
;
...
...
@@ -438,6 +438,13 @@ static void init_format_texture_info(WineD3D_GL_Info *gl_info)
int
fmt_idx
=
getFmtIdx
(
gl_formats_template
[
i
].
fmt
);
struct
GlPixelFormatDesc
*
desc
;
if
(
fmt_idx
==
-
1
)
{
ERR
(
"Format %s (%#x) not found.
\n
"
,
debug_d3dformat
(
gl_formats_template
[
i
].
fmt
),
gl_formats_template
[
i
].
fmt
);
return
FALSE
;
}
desc
=
&
gl_info
->
gl_formats
[
fmt_idx
];
desc
->
glInternal
=
gl_formats_template
[
i
].
glInternal
;
desc
->
glGammaInternal
=
gl_formats_template
[
i
].
glGammaInternal
;
...
...
@@ -470,6 +477,8 @@ static void init_format_texture_info(WineD3D_GL_Info *gl_info)
desc
->
rtInternal
=
gl_formats_template
[
i
].
glInternal
;
}
}
return
TRUE
;
}
static
void
apply_format_fixups
(
WineD3D_GL_Info
*
gl_info
)
...
...
@@ -608,7 +617,11 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
{
if
(
!
init_format_base_info
(
gl_info
))
return
FALSE
;
init_format_texture_info
(
gl_info
);
if
(
!
init_format_texture_info
(
gl_info
))
{
HeapFree
(
GetProcessHeap
(),
0
,
gl_info
->
gl_formats
);
return
FALSE
;
}
apply_format_fixups
(
gl_info
);
...
...
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