diff --git a/pcsx2/gui/AppRes.cpp b/pcsx2/gui/AppRes.cpp index e4e52eeeb8..7621378bb6 100644 --- a/pcsx2/gui/AppRes.cpp +++ b/pcsx2/gui/AppRes.cpp @@ -21,6 +21,8 @@ #include #include +#include "MSWstuff.h" + #include "Resources/EmbeddedImage.h" #include "Resources/BackgroundLogo.h" #include "Resources/ButtonIcon_Camera.h" @@ -145,7 +147,8 @@ const wxBitmap& Pcsx2App::GetLogoBitmap() wxImage img; EmbeddedImage temp; // because gcc can't allow non-const temporaries. LoadImageAny( img, useTheme, mess, L"BackgroundLogo", temp ); - logo = new wxBitmap( img ); + float scale = MSW_GetDPIScale(); // 1.0 for non-Windows + logo = new wxBitmap(img.Scale(img.GetWidth() * scale, img.GetHeight() * scale, wxIMAGE_QUALITY_HIGH)); return *logo; } @@ -167,7 +170,8 @@ const wxBitmap& Pcsx2App::GetScreenshotBitmap() wxImage img; EmbeddedImage temp; // because gcc can't allow non-const temporaries. LoadImageAny(img, useTheme, mess, L"ButtonIcon_Camera", temp); - screenshot = new wxBitmap(img); + float scale = MSW_GetDPIScale(); // 1.0 for non-Windows + screenshot = new wxBitmap(img.Scale(img.GetWidth() * scale, img.GetHeight() * scale, wxIMAGE_QUALITY_HIGH)); return *screenshot; } @@ -177,7 +181,7 @@ wxImageList& Pcsx2App::GetImgList_Config() ScopedPtr& images( GetResourceCache().ConfigImages ); if( !images ) { - int image_size = g_Conf->Listbook_ImageSize; + int image_size = MSW_GetDPIScale() * g_Conf->Listbook_ImageSize; images = new wxImageList(image_size, image_size); wxFileName mess; bool useTheme = (g_Conf->DeskTheme != L"default"); @@ -219,6 +223,7 @@ wxImageList& Pcsx2App::GetImgList_Config() return *images; } +// This stuff seems unused? wxImageList& Pcsx2App::GetImgList_Toolbars() { ScopedPtr& images( GetResourceCache().ToolbarImages ); diff --git a/pcsx2/gui/MSWstuff.cpp b/pcsx2/gui/MSWstuff.cpp index 2ac3fca86c..cb80736c78 100644 --- a/pcsx2/gui/MSWstuff.cpp +++ b/pcsx2/gui/MSWstuff.cpp @@ -28,11 +28,13 @@ void MSW_SetWindowAfter( WXWidget hwnd, WXWidget hwndAfter ) #endif } +// Text scales automatically on Windows but that's about it. The dialog widths +// and images need to be scaled manually. float MSW_GetDPIScale() { #ifdef __WXMSW__ HDC screen = GetDC(0); - float scale = GetDeviceCaps(screen, LOGPIXELSX) / 96.0; + float scale = GetDeviceCaps(screen, LOGPIXELSX) / 96.0; // 96.0 dpi = 100% scale ReleaseDC(NULL, screen); return scale;