mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-26 05:24:21 +01:00
Make display smaller again
This commit is contained in:
parent
430009723d
commit
ea81cac4c3
16
Src/menu.cpp
16
Src/menu.cpp
@ -400,7 +400,7 @@ static void menu_draw(SDL_Surface *screen, menu_t *p_menu, int sel)
|
||||
int x_start = p_menu->x1;
|
||||
int y_start = p_menu->y1 + line_height;
|
||||
SDL_Rect r;
|
||||
int entries_visible = (p_menu->y2 - p_menu->y1) / line_height - 1;
|
||||
int entries_visible = (p_menu->y2 - p_menu->y1) / line_height - 2;
|
||||
|
||||
int i, y;
|
||||
char pTemp[256];
|
||||
@ -864,7 +864,7 @@ int menu_select_sized(const char *title, const char **msgs, int *submenus, int s
|
||||
static int menu_select(const char *title, const char **msgs, int *submenus, int sel)
|
||||
{
|
||||
return menu_select_sized(title, msgs, submenus, sel,
|
||||
0, 0, FULL_DISPLAY_X, FULL_DISPLAY_Y);
|
||||
32, 32, FULL_DISPLAY_X-32, FULL_DISPLAY_Y-64);
|
||||
}
|
||||
|
||||
int menu_select(const char **msgs, int *submenus)
|
||||
@ -879,8 +879,8 @@ static void d64_list_cb(menu_t *p, void *data)
|
||||
const char *dp = (const char*)data;
|
||||
const char *exts[] = {".d64", ".D64", NULL};
|
||||
const char *name = p->pp_msgs[p->cur_sel];
|
||||
SDL_Rect r = {FULL_DISPLAY_X / 2, 0,
|
||||
FULL_DISPLAY_X / 2, FULL_DISPLAY_Y};
|
||||
SDL_Rect r = {FULL_DISPLAY_X / 2, 32,
|
||||
FULL_DISPLAY_X / 2 - 32, FULL_DISPLAY_Y - 64};
|
||||
|
||||
SDL_FillRect(real_screen, &r, SDL_MapRGB(real_screen->format, 0x00, 0x90, 0x90));
|
||||
if (ext_matches_list(name, exts))
|
||||
@ -895,8 +895,8 @@ static void d64_list_cb(menu_t *p, void *data)
|
||||
return;
|
||||
|
||||
menu_init(&menu, "D64 contents", menu_font, dir,
|
||||
FULL_DISPLAY_X / 2, 0,
|
||||
FULL_DISPLAY_X, FULL_DISPLAY_Y);
|
||||
FULL_DISPLAY_X / 2, 32,
|
||||
FULL_DISPLAY_X / 2 - 32, FULL_DISPLAY_Y - 64);
|
||||
menu_draw(real_screen, &menu, 0);
|
||||
menu_fini(&menu);
|
||||
|
||||
@ -1008,7 +1008,7 @@ static const char *menu_select_file_internal(const char *dir_path,
|
||||
const char *menu_select_file_start(const char *dir_path, const char **d64_name)
|
||||
{
|
||||
const char *file = menu_select_file_internal(dir_path,
|
||||
0, 0, FULL_DISPLAY_X/2, FULL_DISPLAY_Y);
|
||||
32, 32, FULL_DISPLAY_X/2, FULL_DISPLAY_Y - 32);
|
||||
const char *exts[] = {".d64", ".D64", NULL};
|
||||
|
||||
if (!file)
|
||||
@ -1022,7 +1022,7 @@ const char *menu_select_file_start(const char *dir_path, const char **d64_name)
|
||||
const char *menu_select_file(const char *dir_path)
|
||||
{
|
||||
return menu_select_file_internal(dir_path,
|
||||
0, 0, FULL_DISPLAY_X/2, FULL_DISPLAY_Y);
|
||||
32, 32, FULL_DISPLAY_X/2, FULL_DISPLAY_Y - 32);
|
||||
}
|
||||
|
||||
static TTF_Font *read_font(const char *path)
|
||||
|
Loading…
Reference in New Issue
Block a user