summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/Steam.vcxproj7
-rw-r--r--protocols/Steam/src/stdafx.h1
-rw-r--r--protocols/Steam/src/steam_dialogs.cpp35
3 files changed, 17 insertions, 26 deletions
diff --git a/protocols/Steam/Steam.vcxproj b/protocols/Steam/Steam.vcxproj
index 32646d1950..0db6b56896 100644
--- a/protocols/Steam/Steam.vcxproj
+++ b/protocols/Steam/Steam.vcxproj
@@ -28,7 +28,12 @@
<ItemGroup>
<ClInclude Include="src\api\*.h" />
<None Include="res\*.ico" />
-</ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\freeimage\freeimage.vcxproj">
+ <Project>{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}</Project>
+ </ProjectReference>
+ </ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<ExceptionHandling>Sync</ExceptionHandling>
diff --git a/protocols/Steam/src/stdafx.h b/protocols/Steam/src/stdafx.h
index a8aa969ca3..4bbc6f770b 100644
--- a/protocols/Steam/src/stdafx.h
+++ b/protocols/Steam/src/stdafx.h
@@ -25,7 +25,6 @@
#include <m_clist.h>
#include <m_genmenu.h>
#include <m_string.h>
-#include <m_freeimage.h>
#include <m_imgsrvc.h>
#include <m_protocols.h>
#include <m_protosvc.h>
diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp
index b3731551b0..568156796f 100644
--- a/protocols/Steam/src/steam_dialogs.cpp
+++ b/protocols/Steam/src/steam_dialogs.cpp
@@ -156,40 +156,27 @@ INT_PTR CSteamCaptchaDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
if (msg == WM_PAINT)
{
- FI_INTERFACE *fei = nullptr;
-
- INT_PTR result = CALLSERVICE_NOTFOUND;
- if (ServiceExists(MS_IMG_GETINTERFACE))
- result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fei);
-
- if (fei == nullptr || result != S_OK) {
- MessageBox(nullptr, TranslateT("Fatal error, image services not found. Avatar services will be disabled."), TranslateT("Avatar Service"), MB_OK);
- return 0;
- }
-
- FIMEMORY *stream = fei->FI_OpenMemory(m_captchaImage, m_captchaImageSize);
- FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeFromMemory(stream, 0);
- FIBITMAP *bitmap = fei->FI_LoadFromMemory(fif, stream, 0);
- fei->FI_CloseMemory(stream);
+ FIMEMORY *stream = FreeImage_OpenMemory(m_captchaImage, m_captchaImageSize);
+ FREE_IMAGE_FORMAT fif = FreeImage_GetFileTypeFromMemory(stream, 0);
+ FIBITMAP *bitmap = FreeImage_LoadFromMemory(fif, stream, 0);
+ FreeImage_CloseMemory(stream);
PAINTSTRUCT ps;
HDC hDC = BeginPaint(m_hwnd, &ps);
- //SetStretchBltMode(hDC, COLORONCOLOR);
StretchDIBits(
hDC,
11, 11,
- fei->FI_GetWidth(bitmap) - 13,
- fei->FI_GetHeight(bitmap),
+ FreeImage_GetWidth(bitmap) - 13,
+ FreeImage_GetHeight(bitmap),
0, 0,
- fei->FI_GetWidth(bitmap),
- fei->FI_GetHeight(bitmap),
- fei->FI_GetBits(bitmap),
- fei->FI_GetInfo(bitmap),
+ FreeImage_GetWidth(bitmap),
+ FreeImage_GetHeight(bitmap),
+ FreeImage_GetBits(bitmap),
+ FreeImage_GetInfo(bitmap),
DIB_RGB_COLORS, SRCCOPY);
- fei->FI_Unload(bitmap);
- //fei->FI_DeInitialise();
+ FreeImage_Unload(bitmap);
EndPaint(m_hwnd, &ps);