diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index 1a8208c311..deb6df8c8c 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -8,11 +8,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include "Common/ChunkFile.h" #include "Common/CommonPaths.h" @@ -131,7 +133,7 @@ GameListItem::GameListItem(const std::string& _rFileName) if (!m_pImage.empty()) { wxImage Image(m_ImageWidth, m_ImageHeight, &m_pImage[0], true); - double Scale = WxUtils::GetCurrentBitmapLogicalScale(); + double Scale = wxTheApp->GetTopWindow()->GetContentScaleFactor(); // Note: This uses nearest neighbor, which subjectively looks a lot // better for GC banners than smooths caling. Image.Rescale(DVD_BANNER_WIDTH * Scale, DVD_BANNER_HEIGHT * Scale); diff --git a/Source/Core/DolphinWX/WxUtils.cpp b/Source/Core/DolphinWX/WxUtils.cpp index 3a2f2674ac..1926a5e016 100644 --- a/Source/Core/DolphinWX/WxUtils.cpp +++ b/Source/Core/DolphinWX/WxUtils.cpp @@ -58,18 +58,6 @@ void ShowErrorDialog(const wxString& error_msg) wxMessageBox(error_msg, _("Error"), wxOK | wxICON_ERROR); } -double GetCurrentBitmapLogicalScale() -{ -#ifdef __APPLE__ - // wx doesn't expose this itself, unfortunately. - if ([[NSScreen mainScreen] respondsToSelector:@selector(backingScaleFactor)]) - { - return [[NSScreen mainScreen] backingScaleFactor]; - } -#endif - return 1.0; -} - wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length) { wxMemoryInputStream is(data, length); diff --git a/Source/Core/DolphinWX/WxUtils.h b/Source/Core/DolphinWX/WxUtils.h index 6338b0051b..09da7bfed8 100644 --- a/Source/Core/DolphinWX/WxUtils.h +++ b/Source/Core/DolphinWX/WxUtils.h @@ -25,8 +25,6 @@ void Explore(const std::string& path); // Displays a wxMessageBox geared for errors void ShowErrorDialog(const wxString& error_msg); -double GetCurrentBitmapLogicalScale(); - wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length); // From a wxBitmap, creates the corresponding disabled version for toolbar buttons