• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Virtual machine Management Terminal User Interface


Commit MetaInfo

修订版2cea259b96ddb86b53573000b342d60e973b96ee (tree)
时间2022-07-24 21:37:33
作者Koine Yuusuke(koinec) <koinec@user...>
CommiterKoine Yuusuke(koinec)

Log Message

Improve HyperVisor connecting animation logic.

更改概述

差异

--- a/src/tuivmlist.c
+++ b/src/tuivmlist.c
@@ -191,6 +191,7 @@ int
191191 VmList_Item *p_item;
192192 char str_fmt[32];
193193 char str_stat[16];
194+ char str_animation[5] = "-\\|/";
194195
195196 i_err = TuiVmList_CreateList();
196197
@@ -220,12 +221,10 @@ int
220221 i_attr = COLOR_PAIR(2); // Green-Black
221222 }
222223 else if( HVISOR_STATUS_CONNECTING & p_hvisor->dw_status ) {
223- if( 2 < p_item->i_animation ) { p_item->i_animation = 0; }
224- str_stat[0] = ((0 == p_item->i_animation) ? '-' :
225- ((1 == p_item->i_animation) ? '\\' : '/'));
224+ str_stat[0] = str_animation[ p_item->i_animation ];
226225 str_stat[1] = '\0';
227226 strncat( str_stat, " Connecting.", 15 );
228- p_item->i_animation++;
227+ p_item->i_animation = ++p_item->i_animation % 4;
229228
230229 i_attr = COLOR_PAIR(6); // Green-Black
231230 }