git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74302
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxString ext = GetExtension().Lower();
wxCFStringRef resname(name);
{
wxString ext = GetExtension().Lower();
wxCFStringRef resname(name);
+ wxCFStringRef resname2x(name+"@2x");
wxCFStringRef restype(ext);
wxCFStringRef restype(ext);
- wxCFRef<CFURLRef> imageURL(CFBundleCopyResourceURL(CFBundleGetMainBundle(), resname, restype, NULL));
+ wxCFRef<CFURLRef> imageURL;
+
+#if wxOSX_USE_COCOA
+ if ( wxOSXGetMainScreenContentScaleFactor() > 1.9 )
+ {
+ imageURL.reset(CFBundleCopyResourceURL(CFBundleGetMainBundle(), resname2x, restype, NULL));
+ scale = 2.0;
+ }
+#endif
+
+ if ( imageURL.get() == NULL )
+ {
+ imageURL.reset(CFBundleCopyResourceURL(CFBundleGetMainBundle(), resname, restype, NULL));
+ scale = 1.0;
+ }
if ( imageURL.get() != NULL )
{
if ( imageURL.get() != NULL )
{
kCGRenderingIntentDefault);
if ( image != NULL )
{
kCGRenderingIntentDefault);
if ( image != NULL )
{
+ bitmap->Create(image,scale);
CGImageRelease(image);
}
}
CGImageRelease(image);
}
}