Improved get display depth

It now works for all depths, not just the 2 hard coded ones
This commit is contained in:
Dimitris Panokostas 2020-06-13 21:39:16 +02:00
parent 6e5ae60004
commit 8022b12773

View file

@ -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;
}