Skip to content

Commit 2374c91

Browse files
committed
rg_gui: Fixed keyboard on lower resolution screens
It's still not perfect but at least it's now usable.
1 parent 7172d7d commit 2374c91

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

components/retro-go/rg_gui.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ char *rg_gui_file_picker(const char *title, const char *path, bool (*validator)(
10571057
void rg_gui_draw_input_screen(const char *title, const char *message, const char *input_buffer,
10581058
const rg_keyboard_layout_t *current_layout, int cursor_pos, bool partial_redraw)
10591059
{
1060-
const int key_width = 28;
1060+
const int key_width = gui.screen_width / 10 - 4;
10611061
const int key_height = 20;
10621062
const int keyboard_width = current_layout->columns * key_width;
10631063
const int keyboard_height = current_layout->rows * key_height;
@@ -1103,7 +1103,7 @@ void rg_gui_draw_input_screen(const char *title, const char *message, const char
11031103

11041104
void rg_gui_draw_virtual_keyboard(int x_pos, int y_pos, const rg_keyboard_layout_t *current_layout, int cursor_pos, bool partial_redraw)
11051105
{
1106-
const int key_width = 28;
1106+
const int key_width = gui.screen_width / 10 - 4;
11071107
const int key_height = 20;
11081108
const int keyboard_width = current_layout->columns * key_width;
11091109
const int keyboard_height = current_layout->rows * key_height;

0 commit comments

Comments
 (0)