threerings/Sparrow-Framework — comment on commit 880a6cf5fbbf0d0bb15456e9d7d0fe39777c7766
File:  line 0
By PrimaryFeather:

OK, I fixed it (and silently updated the GitHub tag "v1.3") with commit #8e6576f171

The reason for this "crazy workaround" is that when there's an @2x texture, but we're NOT supporting retina displays ([SPStage supportHighResolutions:NO]), this method still loaded the HD texture, and you'd get the same kinds of problems you experienced now, only under different circumstances.

To fix it, I added an extension to the NSString class: You can now ask a string which content factor it contains:

´´´ objc
NSString *filename = @"/some/folders/filename@2x.png";
float scaleFactor = [filename contentScaleFactor];
´´´

Now, this should finally be settled. It would really be awesome if Apple had added a method to UIImage allowing to load a **specific** file, without automatically adding the scale factor part.