Apparently MICROS~1 still doesn't support this (clang and gcc do).
Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
void SCR_DrawConsole (void)
{
// infobar and loading progress are not drawn simultaneously
- scr_con_margin_bottom = SCR_InfobarHeight() ?: scr_loading * scr_loadingscreen_barheight.integer;
+ scr_con_margin_bottom = SCR_InfobarHeight();
+ if (!scr_con_margin_bottom && scr_loading)
+ scr_con_margin_bottom = scr_loadingscreen_barheight.integer;
if (key_consoleactive & KEY_CONSOLEACTIVE_FORCED)
{
// full screen
*/
size_t dp__strlcat(char *dst, const char *src, size_t dsize, const char *func, unsigned line)
{
- char *p = (char *)memchr(dst, '\0', dsize) ?: dst;
- size_t offset = p - dst;
+ size_t offset;
+ char *p = (char *)memchr(dst, '\0', dsize);
+ if (!p)
+ p = dst;
+ offset = p - dst;
return dp__strlcpy(p, src, dsize - offset, func, line) + offset;
}
break;
case SLIF_PING:
// display inf when a listed server times out and net_slist_pause blocks its removal
- PRVM_G_FLOAT( OFS_RETURN ) = cache->info.ping ?: INFINITY;
+ PRVM_G_FLOAT( OFS_RETURN ) = cache->info.ping ? cache->info.ping : INFINITY;
break;
case SLIF_PROTOCOL:
PRVM_G_FLOAT( OFS_RETURN ) = cache->info.protocol;
// update description strings for engine menu and console output
entry->line1_len = dpsnprintf(entry->line1, sizeof(serverlist_cache[n].line1), "^%c%5.0f^7 ^%c%3u^7/%3u %-65.65s",
info->ping >= 300 ? '1' : (info->ping >= 200 ? '3' : '7'),
- info->ping ?: INFINITY, // display inf when a listed server times out and net_slist_pause blocks its removal
+ info->ping ? info->ping : INFINITY, // display inf when a listed server times out and net_slist_pause blocks its removal
((info->numhumans > 0 && info->numhumans < info->maxplayers) ? (info->numhumans >= 4 ? '7' : '3') : '1'),
info->numplayers,
info->maxplayers,