Fix buffer swapping on Android 7.1 and earlier
* java/org/gnu/emacs/EmacsSurfaceView.java (reconfigureFrontBuffer): Don't use function only present on Android 8.0 and later.
This commit is contained in:
parent
a1941cd7a7
commit
664140fc26
1 changed files with 10 additions and 4 deletions
|
@ -79,10 +79,16 @@ public class EmacsSurfaceView extends View
|
|||
|
||||
if (bitmap != null && frontBuffer == null)
|
||||
{
|
||||
frontBuffer = Bitmap.createBitmap (bitmap.getWidth (),
|
||||
bitmap.getHeight (),
|
||||
Bitmap.Config.ARGB_8888,
|
||||
false);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
frontBuffer = Bitmap.createBitmap (bitmap.getWidth (),
|
||||
bitmap.getHeight (),
|
||||
Bitmap.Config.ARGB_8888,
|
||||
false);
|
||||
else
|
||||
frontBuffer = Bitmap.createBitmap (bitmap.getWidth (),
|
||||
bitmap.getHeight (),
|
||||
Bitmap.Config.ARGB_8888);
|
||||
|
||||
bitmapCanvas = new Canvas (frontBuffer);
|
||||
|
||||
/* And copy over the bitmap contents. */
|
||||
|
|
Loading…
Add table
Reference in a new issue