Revision: 2443
http://sourceforge.net/p/swingme/code/2443
Author: yuranet
Date: 2021-05-06 19:42:14 +0000 (Thu, 06 May 2021)
Log Message:
-----------
do not error log strange images as we fully recover
Modified Paths:
--------------
AndroidME/src_MIDP/javax/microedition/lcdui/Image.java
Modified: AndroidME/src_MIDP/javax/microedition/lcdui/Image.java
===================================================================
--- AndroidME/src_MIDP/javax/microedition/lcdui/Image.java 2021-05-06 14:51:01 UTC (rev 2442)
+++ AndroidME/src_MIDP/javax/microedition/lcdui/Image.java 2021-05-06 19:42:14 UTC (rev 2443)
@@ -139,7 +139,10 @@
}
if (systemDensity != AndroidMeApp.getContext().getResources().getDisplayMetrics().densityDpi) {
// on API-26 and API-30 on some Samsungs the current density does not seem to match bitmaps density
- System.err.println("startup density does not match current (app context) density: " + AndroidMeApp.getContext().getResources().getDisplayMetrics().densityDpi);
+ // app context density changes to a new value once the activity is started
+ // and the activity context returns the original app context density
+ // any new images loaded have the new incorrect app context density
+ System.out.println("startup density does not match current (app context) density: " + AndroidMeApp.getContext().getResources().getDisplayMetrics().densityDpi);
}
// some Samsungs will set density to a random number, so we fix it so it draws correctly
@@ -148,7 +151,7 @@
int bitmapDensity = bitmap.getDensity();
int w = bitmap.getWidth();
int h = bitmap.getHeight();
- System.err.println("unexpected bitmap density=" + bitmapDensity + " " + w + "x" + h +
+ System.out.println("unexpected bitmap density=" + bitmapDensity + " " + w + "x" + h +
" (system=" + systemDensity + " " + scaleFromDensity(w, bitmapDensity, systemDensity) + "x" + scaleFromDensity(h, bitmapDensity, systemDensity) + ")" +
" for " + stream);
bitmap.setDensity(systemDensity);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|