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
3b61019b
Commit
3b61019b
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 GL_OUT_OF_MEMORY from gluScaleImage if no context.
parent
ac363481
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
mipmap.c
dlls/glu32/mipmap.c
+5
-0
glu.c
dlls/glu32/tests/glu.c
+0
-3
No files found.
dlls/glu32/mipmap.c
View file @
3b61019b
...
...
@@ -37,6 +37,7 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/wgl.h"
#include "wine/glu.h"
...
...
@@ -3452,6 +3453,10 @@ GLint WINAPI gluScaleImage( GLenum format, GLint widthin, GLint heightin, GLenum
if
(
!
isLegalFormatForPackedPixelType
(
format
,
typeout
))
{
return
GLU_INVALID_OPERATION
;
}
if
(
!
wglGetCurrentContext
())
{
return
GL_OUT_OF_MEMORY
;
/* windows returns this if no gl context (not glu error) */
}
beforeImage
=
HeapAlloc
(
GetProcessHeap
(),
0
,
image_size
(
widthin
,
heightin
,
format
,
GL_UNSIGNED_SHORT
));
afterImage
=
...
...
dlls/glu32/tests/glu.c
View file @
3b61019b
...
...
@@ -40,12 +40,9 @@ static void test_gluScaleImage(HDC hdc, HGLRC hglrc)
/* test without any context */
wglMakeCurrent
(
hdc
,
0
);
/* test crashes on Wine */
if
(
!
winetest_platform_is_wine
)
{
err
=
gluScaleImage
(
GL_RGBA
,
DIMIN
,
DIMIN
,
GL_UNSIGNED_BYTE
,
bufin
,
DIMOUT
,
DIMOUT
,
GL_UNSIGNED_BYTE
,
bufout
);
ok
(
err
==
GL_OUT_OF_MEMORY
,
"got %x
\n
"
,
err
);
}
/* test with context */
wglMakeCurrent
(
hdc
,
hglrc
);
...
...
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