From 8022b1277396bf3e0cfaa747e06de4c8d00c9c33 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sat, 13 Jun 2020 21:39:16 +0200 Subject: [PATCH] Improved get display depth It now works for all depths, not just the 2 hard coded ones --- src/osdep/amiberry_gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osdep/amiberry_gfx.cpp b/src/osdep/amiberry_gfx.cpp index f4a42d82..497ca16f 100644 --- a/src/osdep/amiberry_gfx.cpp +++ b/src/osdep/amiberry_gfx.cpp @@ -1060,7 +1060,7 @@ static int init_colors() */ static int get_display_depth() { - const auto depth = screen->format->BytesPerPixel == 4 ? 32 : 16; + const auto depth = screen->format->BytesPerPixel * 8; return depth; }