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
494841d3
Commit
494841d3
authored
Jul 13, 2006
by
Christian Costa
Committed by
Alexandre Julliard
Jul 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only copy memory corresponding to the dib section instead of the power of 2 surface.
parent
38c8950e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
surface.c
dlls/wined3d/surface.c
+3
-2
wined3d_main.c
dlls/wined3d/wined3d_main.c
+1
-1
No files found.
dlls/wined3d/surface.c
View file @
494841d3
...
...
@@ -1021,17 +1021,18 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
if
(
(
NP2_REPACK
==
wined3d_settings
.
nonpower2_mode
||
This
->
resource
.
usage
&
WINED3DUSAGE_RENDERTARGET
))
{
b_info
->
bmiHeader
.
biWidth
=
This
->
currentDesc
.
Width
;
b_info
->
bmiHeader
.
biHeight
=
-
This
->
currentDesc
.
Height
;
b_info
->
bmiHeader
.
biSizeImage
=
This
->
currentDesc
.
Width
*
This
->
currentDesc
.
Height
*
This
->
bytesPerPixel
;
/* Use the full pow2 image size(assigned below) because LockRect
* will need it for a full glGetTexImage call
*/
}
else
{
b_info
->
bmiHeader
.
biWidth
=
This
->
pow2Width
;
b_info
->
bmiHeader
.
biHeight
=
-
This
->
pow2Height
;
b_info
->
bmiHeader
.
biSizeImage
=
This
->
resource
.
size
;
}
b_info
->
bmiHeader
.
biPlanes
=
1
;
b_info
->
bmiHeader
.
biBitCount
=
This
->
bytesPerPixel
*
8
;
b_info
->
bmiHeader
.
biSizeImage
=
This
->
resource
.
size
;
b_info
->
bmiHeader
.
biXPelsPerMeter
=
0
;
b_info
->
bmiHeader
.
biYPelsPerMeter
=
0
;
...
...
@@ -1092,7 +1093,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
/* copy the existing surface to the dib section */
if
(
This
->
resource
.
allocatedMemory
)
{
memcpy
(
This
->
dib
.
bitmap_data
,
This
->
resource
.
allocatedMemory
,
This
->
resource
.
siz
e
);
memcpy
(
This
->
dib
.
bitmap_data
,
This
->
resource
.
allocatedMemory
,
b_info
->
bmiHeader
.
biSizeImag
e
);
/* We won't need that any more */
HeapFree
(
GetProcessHeap
(),
0
,
This
->
resource
.
allocatedMemory
);
}
else
{
...
...
dlls/wined3d/wined3d_main.c
View file @
494841d3
...
...
@@ -191,7 +191,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
}
else
if
(
!
strcmp
(
buffer
,
"repack"
))
{
TRACE
(
"Repacking non-power2 text
re
\n
"
);
TRACE
(
"Repacking non-power2 text
ures
\n
"
);
wined3d_settings
.
nonpower2_mode
=
NP2_REPACK
;
}
/* There will be a couple of other choices for nonpow2, they are: TextureRecrangle and OpenGL 2 */
...
...
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