Perform win32 gui internal palette swapping only in case of a bpp change.
This commit is contained in:
parent
abdbc52f22
commit
4455da0e1b
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002-2023 The Bochs Project
|
||||
// Copyright (C) 2002-2024 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -1891,6 +1891,7 @@ void bx_win32_gui_c::dimension_update(unsigned x, unsigned y, unsigned fheight,
|
||||
}
|
||||
|
||||
bitmap_info->bmiHeader.biBitCount = bpp;
|
||||
if (bpp != current_bpp) {
|
||||
if (bpp == 16) {
|
||||
bitmap_info->bmiHeader.biCompression = BI_BITFIELDS;
|
||||
static RGBQUAD red_mask = {0x00, 0xF8, 0x00, 0x00};
|
||||
@ -1913,6 +1914,7 @@ void bx_win32_gui_c::dimension_update(unsigned x, unsigned y, unsigned fheight,
|
||||
bitmap_info->bmiHeader.biBitCount = 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
current_bpp = guest_bpp = bpp;
|
||||
|
||||
resize_main_window(FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user