Improved get display depth
It now works for all depths, not just the 2 hard coded ones
This commit is contained in:
parent
6e5ae60004
commit
8022b12773
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue