Skip to content

Commit 6aaffc3

Browse files
committed
Fixed custom bitmap allocation
1 parent 9cab7fa commit 6aaffc3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

game/source/interface/gui_custom_bitmap_storage.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ void __thiscall c_gui_custom_bitmap_storage_item::initialize(int32 width, int32
3939
m_use_compressed_format = use_compressed_format;
4040
e_bitmap_format bitmap_format = m_use_compressed_format ? _bitmap_format_dxt5 : _bitmap_format_a8r8g8b8;
4141
D3DFORMAT hardware_format = m_use_compressed_format ? D3DFMT_DXT5 : D3DFMT_A8R8G8B8;
42-
uns16 flags = FLAG(_bitmap_free_on_delete_bit) | FLAG(_bitmap_hardware_only_bit);
42+
constexpr uns16 flags = FLAG(_bitmap_free_on_delete_bit) | FLAG(_bitmap_hardware_only_bit);
4343

4444
bitmap_2d_initialize(&m_bitmap_data, (int16)width, (int16)height, 0, bitmap_format, flags, false, true);
4545
m_bitmap_data.curve = _bitmap_curve_linear;
4646

4747
c_rasterizer_texture_ref::release(m_hardware_format_bitmap);
48-
c_rasterizer_texture_ref::allocate(m_hardware_format_bitmap, width, height, 1, hardware_format, D3DPOOL_DEFAULT, false, 0, 0);
48+
c_rasterizer_texture_ref::allocate(m_hardware_format_bitmap, width, height, 1, hardware_format, D3DPOOL_DEFAULT, true, _bitmap_type_2d, 0);
4949

5050
m_width = m_bitmap_data.width;
5151
m_height = m_bitmap_data.height;

0 commit comments

Comments
 (0)