summaryrefslogtreecommitdiff
path: root/gs
diff options
context:
space:
mode:
authorIgor Melichev <igor.melichev@artifex.com>2002-01-12 19:49:00 +0000
committerIgor Melichev <igor.melichev@artifex.com>2002-01-12 19:49:00 +0000
commitaae400aa53a60a7a5e551f75da3bfb676f97ec38 (patch)
tree952fc541a75b476d8882287a77a2604829b13446 /gs
parentae5ce0e0bf31ee371d90fa4d554c66ad4df0bc63 (diff)
downloadghostpdl-aae400aa53a60a7a5e551f75da3bfb676f97ec38.tar.gz
Fix: ReleaseDC was missed in Windows client applications.
SourceForge bug #499903. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@2017 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs')
-rw-r--r--gs/src/dwmain.c1
-rw-r--r--gs/src/dwmainc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/gs/src/dwmain.c b/gs/src/dwmain.c
index 6a1def6b4..defc1c44b 100644
--- a/gs/src/dwmain.c
+++ b/gs/src/dwmain.c
@@ -279,6 +279,7 @@ int new_main(int argc, char *argv[])
DISPLAY_DEPTH_1 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
HDC hdc = GetDC(NULL); /* get hdc for desktop */
int depth = GetDeviceCaps(hdc, PLANES) * GetDeviceCaps(hdc, BITSPIXEL);
+ ReleaseDC(NULL, hdc);
if (depth == 32)
format = DISPLAY_COLORS_RGB | DISPLAY_UNUSED_LAST |
DISPLAY_DEPTH_8 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
diff --git a/gs/src/dwmainc.c b/gs/src/dwmainc.c
index d94a9da82..38b187512 100644
--- a/gs/src/dwmainc.c
+++ b/gs/src/dwmainc.c
@@ -349,6 +349,7 @@ int main(int argc, char *argv[])
DISPLAY_DEPTH_1 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;
HDC hdc = GetDC(NULL); /* get hdc for desktop */
int depth = GetDeviceCaps(hdc, PLANES) * GetDeviceCaps(hdc, BITSPIXEL);
+ ReleaseDC(NULL, hdc);
if (depth == 32)
format = DISPLAY_COLORS_RGB | DISPLAY_UNUSED_LAST |
DISPLAY_DEPTH_8 | DISPLAY_LITTLEENDIAN | DISPLAY_BOTTOMFIRST;