DXGL r465 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r464
|
r465
|
r466
>
Date:
00:13, 14 July 2014
Author:
admin
Status:
new
Tags:
Comment:
Initialize icon surface before drawing the icon in the ROP Blt test.
Modified paths:
/dxgltest/surfacegen.cpp
(modified) (
history
)
Diff
[
purge
]
Index: dxgltest/surfacegen.cpp
—
—
@@ -916,11 +916,20 @@
917
917
HICON ico_x16;
918
918
HDC hdc;
919
919
DDSURFACEDESC2 ddsd;
920
+ int bltx, blty;
921
+ RECT bltrect;
922
+ DDBLTFX bltfx;
923
+ ZeroMemory(&bltfx, sizeof(DDBLTFX));
924
+ bltfx.dwSize = sizeof(DDBLTFX);
920
925
ZeroMemory(&ddsd, sizeof(DDSURFACEDESC2));
921
926
if (ddver > 3)ddsd.dwSize = sizeof(DDSURFACEDESC2);
922
927
else ddsd.dwSize = sizeof(DDSURFACEDESC);
923
928
ico_dxglsm = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_DXGLSM), IMAGE_ICON, 16, 16, 0);
924
929
ico_x16 = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_X16), IMAGE_ICON, 16, 16, 0);
930
+ bltrect.left = bltrect.top = 0;
931
+ bltrect.bottom = bltrect.right = 16;
932
+ bltfx.dwFillColor = 0;
933
+ sprites[2].surface->Blt(&bltrect, NULL, NULL, DDBLT_COLORFILL, &bltfx);
925
934
sprites[2].surface->GetDC(&hdc);
926
935
DrawIconEx(hdc, 0, 0, ico_dxglsm, 16, 16, 0, NULL, DI_NORMAL);
927
936
sprites[2].surface->ReleaseDC(hdc);
—
—
@@ -982,11 +991,6 @@
983
992
break;
984
993
}
985
994
sprites[5].surface->Unlock(NULL);
986
- int bltx, blty;
987
- RECT bltrect;
988
- DDBLTFX bltfx;
989
- ZeroMemory(&bltfx, sizeof(DDBLTFX));
990
- bltfx.dwSize = sizeof(DDBLTFX);
991
995
for (int y = 0; y < 32; y++)
992
996
{
993
997
for (int x = 0; x < 32; x++)
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version