mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-08-03 18:57:27 -04:00
Fix virtual keyboard so that it can get allocated as a 4bpp texture
This commit is contained in:
parent
027c6a8fb7
commit
157c538a08
@ -157,7 +157,7 @@ static void VirtualKeyboard_Draw(struct Context2D* ctx) {
|
||||
w = kb_tileWidth * KB_GetCellWidth(i);
|
||||
h = kb_tileHeight;
|
||||
|
||||
Gradient_Noise(ctx, i == selected ? KB_SELECTED_COLOR : KB_NORMAL_COLOR, 4, x, y, w, h);
|
||||
Gradient_Noise(ctx, i == selected ? KB_SELECTED_COLOR : KB_NORMAL_COLOR, 2, x, y, w, h);
|
||||
LWidget_DrawBorder(ctx, KB_BACKGROUND_COLOR, 1, 1, x, y, w, h);
|
||||
|
||||
dx = (w - Drawer2D_TextWidth (&args)) / 2;
|
||||
|
@ -464,7 +464,7 @@ GfxResourceID Gfx_AllocTexture(struct Bitmap* bmp, int rowWidth, cc_uint8 flags,
|
||||
tex->pal_index = pal_index;
|
||||
ConvertTexture_Palette((cc_uint8*)tex->pixels, bmp, rowWidth, palette, pal_count);
|
||||
|
||||
int size = VRAM_Size(tex->width, max(32, 1 << tex->log2_h), GS_PSM_4HH);
|
||||
int size = VRAM_Size(tex->width, ALIGNUP(tex->height, 32), GS_PSM_4HH);
|
||||
// TODO fix properly. alignup instead
|
||||
int blocks = SIZE_TO_BLOCKS(size, TEXMEM_BLOCK_SIZE);
|
||||
tex->blocks = blocks;
|
||||
|
Loading…
x
Reference in New Issue
Block a user