+ double scale = 1.0;
+ wxString fname = filename;
+
+ if ( type == wxBITMAP_TYPE_PNG )
+ {
+ if ( wxOSXGetMainScreenContentScaleFactor() > 1.9 )
+ {
+ wxFileName fn(filename);
+ fn.MakeAbsolute();
+ fn.SetName(fn.GetName()+"@2x");
+
+ if ( fn.Exists() )
+ {
+ fname = fn.GetFullPath();
+ scale = 2.0;
+ }
+ }
+ }
+
+ wxImage loadimage(fname, type);