summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_dialogs.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-06-18 15:53:28 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-06-18 15:53:28 +0000
commit712eac88f619b057d335bbe11426292f033a6f49 (patch)
tree7eb68a78c6a79a8e84e4feb46d7751bb2f6b8024 /protocols/Steam/src/steam_dialogs.cpp
parented71ff438fb48e32346480bda3b7214b9f2f487b (diff)
Steam: captcha support
git-svn-id: http://svn.miranda-ng.org/main/trunk@9537 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_dialogs.cpp')
-rw-r--r--protocols/Steam/src/steam_dialogs.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp
index 4df9192d81..882a30b70a 100644
--- a/protocols/Steam/src/steam_dialogs.cpp
+++ b/protocols/Steam/src/steam_dialogs.cpp
@@ -83,18 +83,20 @@ INT_PTR CALLBACK CSteamProto::CaptchaProc(HWND hwnd, UINT message, WPARAM wParam
return 0;
}
- FIMEMORY *memory = fei->FI_OpenMemory(captcha->data, captcha->size);
- FIBITMAP *bitmap = fei->FI_LoadFromMemory(FIF_PNG, memory, PNG_DEFAULT);
- fei->FI_CloseMemory(memory);
+ FIMEMORY *stream = fei->FI_OpenMemory(captcha->data, captcha->size);
+ FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeFromMemory(stream, 0);
+ FIBITMAP *bitmap = fei->FI_LoadFromMemory(fif, stream, 0);
+ fei->FI_CloseMemory(stream);
PAINTSTRUCT ps;
HDC hDC = BeginPaint(hwnd, &ps);
- SetStretchBltMode(hDC, COLORONCOLOR);
+ //SetStretchBltMode(hDC, COLORONCOLOR);
StretchDIBits(
hDC,
- 0, 0,
- 206, 40,
+ 11, 11,
+ fei->FI_GetWidth(bitmap) - 13,
+ fei->FI_GetHeight(bitmap),
0, 0,
fei->FI_GetWidth(bitmap),
fei->FI_GetHeight(bitmap),