X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fmenu%2Fxonotic%2Fskinlist.c;h=fdb07870a411f12b8b068eaf1601437d966ba7ab;hb=8c8a22011714768f8c5b3ac887d0fd099fc08d8b;hp=bb01f974cbf1d0c6312b57cd8ec40c1f0107edca;hpb=fc3e13dd48a3e16c4173617475adc240ace548fe;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/skinlist.c b/qcsrc/menu/xonotic/skinlist.c index bb01f974c..fdb07870a 100644 --- a/qcsrc/menu/xonotic/skinlist.c +++ b/qcsrc/menu/xonotic/skinlist.c @@ -104,7 +104,10 @@ void XonoticSkinList_getSkins(entity me) bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, _("")); bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, _("<AUTHOR>")); - bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")); + if(draw_PictureSize(strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")) == '0 0 0') + bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, "nopreview_menuskin"); + else + bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")); fh = fopen(language_filename(s), FILE_READ); if(fh < 0) { @@ -172,7 +175,7 @@ void XonoticSkinList_drawListBoxItem(entity me, float i, vector absSize, float i void XonoticSkinList_setSkin(entity me) { me.saveCvars(me); - localcmd("\nmenu_restart\ntogglemenu\ndefer 0.1 \"menu_cmd skinselect\"\n"); + localcmd("\nmenu_restart\nmenu_cmd skinselect\n"); } void SetSkin_Click(entity btn, entity me)