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
ee1e15ac
Commit
ee1e15ac
authored
Jan 28, 2024
by
Daniel Lehman
Committed by
Alexandre Julliard
Jan 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
glu32: Return GLU_INVALID_ENUM for illegal pixel types.
parent
3b61019b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
mipmap.c
dlls/glu32/mipmap.c
+2
-2
glu.c
dlls/glu32/tests/glu.c
+0
-2
No files found.
dlls/glu32/mipmap.c
View file @
ee1e15ac
...
@@ -3448,10 +3448,10 @@ GLint WINAPI gluScaleImage( GLenum format, GLint widthin, GLint heightin, GLenum
...
@@ -3448,10 +3448,10 @@ GLint WINAPI gluScaleImage( GLenum format, GLint widthin, GLint heightin, GLenum
return
GLU_INVALID_ENUM
;
return
GLU_INVALID_ENUM
;
}
}
if
(
!
isLegalFormatForPackedPixelType
(
format
,
typein
))
{
if
(
!
isLegalFormatForPackedPixelType
(
format
,
typein
))
{
return
GLU_INVALID_
OPERATION
;
return
GLU_INVALID_
ENUM
;
}
}
if
(
!
isLegalFormatForPackedPixelType
(
format
,
typeout
))
{
if
(
!
isLegalFormatForPackedPixelType
(
format
,
typeout
))
{
return
GLU_INVALID_
OPERATION
;
return
GLU_INVALID_
ENUM
;
}
}
if
(
!
wglGetCurrentContext
())
{
if
(
!
wglGetCurrentContext
())
{
return
GL_OUT_OF_MEMORY
;
/* windows returns this if no gl context (not glu error) */
return
GL_OUT_OF_MEMORY
;
/* windows returns this if no gl context (not glu error) */
...
...
dlls/glu32/tests/glu.c
View file @
ee1e15ac
...
@@ -72,14 +72,12 @@ static void test_gluScaleImage(HDC hdc, HGLRC hglrc)
...
@@ -72,14 +72,12 @@ static void test_gluScaleImage(HDC hdc, HGLRC hglrc)
DIMOUT
,
DIMOUT
,
~
0
,
bufout
);
DIMOUT
,
DIMOUT
,
~
0
,
bufout
);
ok
(
err
==
GLU_INVALID_ENUM
,
"got %x
\n
"
,
err
);
ok
(
err
==
GLU_INVALID_ENUM
,
"got %x
\n
"
,
err
);
todo_wine
{
err
=
gluScaleImage
(
GL_RGBA
,
DIMIN
,
DIMIN
,
GL_UNSIGNED_BYTE_3_3_2
,
bufin
,
err
=
gluScaleImage
(
GL_RGBA
,
DIMIN
,
DIMIN
,
GL_UNSIGNED_BYTE_3_3_2
,
bufin
,
DIMOUT
,
DIMOUT
,
GL_UNSIGNED_BYTE
,
bufout
);
DIMOUT
,
DIMOUT
,
GL_UNSIGNED_BYTE
,
bufout
);
ok
(
err
==
GLU_INVALID_ENUM
,
"got %x
\n
"
,
err
);
ok
(
err
==
GLU_INVALID_ENUM
,
"got %x
\n
"
,
err
);
err
=
gluScaleImage
(
GL_RGBA
,
DIMIN
,
DIMIN
,
GL_UNSIGNED_BYTE
,
bufin
,
err
=
gluScaleImage
(
GL_RGBA
,
DIMIN
,
DIMIN
,
GL_UNSIGNED_BYTE
,
bufin
,
DIMOUT
,
DIMOUT
,
GL_UNSIGNED_BYTE_3_3_2
,
bufout
);
DIMOUT
,
DIMOUT
,
GL_UNSIGNED_BYTE_3_3_2
,
bufout
);
ok
(
err
==
GLU_INVALID_ENUM
,
"got %x
\n
"
,
err
);
ok
(
err
==
GLU_INVALID_ENUM
,
"got %x
\n
"
,
err
);
}
/* valid arguments */
/* valid arguments */
memset
(
bufout
,
0
,
SIZEOUT
);
memset
(
bufout
,
0
,
SIZEOUT
);
...
...
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