mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
Scale down model preview icon is too big
This commit is contained in:
parent
7be959894b
commit
408e7d9a99
1 changed files with 13 additions and 1 deletions
|
@ -4760,6 +4760,8 @@ PlayerConfig_MenuDraw(void)
|
|||
{
|
||||
entity_t entity;
|
||||
char scratch[MAX_QPATH];
|
||||
int w, h;
|
||||
float picscale;
|
||||
|
||||
memset(&entity, 0, sizeof(entity));
|
||||
|
||||
|
@ -4804,7 +4806,17 @@ PlayerConfig_MenuDraw(void)
|
|||
s_pmi[s_player_model_box.curvalue].directory,
|
||||
s_pmi[s_player_model_box.curvalue].skindisplaynames[
|
||||
s_player_skin_box.curvalue]);
|
||||
Draw_PicScaled(s_player_config_menu.x - 40*scale, refdef.y, scratch, scale);
|
||||
|
||||
Draw_GetPicSize(&w, &h, scratch);
|
||||
picscale = scale;
|
||||
if (w != -1 && h != -1)
|
||||
{
|
||||
if (h > 32)
|
||||
{
|
||||
picscale = (picscale * 32) / h;
|
||||
}
|
||||
Draw_PicScaled(s_player_config_menu.x - 40*scale, refdef.y, scratch, picscale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue