COM ポート遅延再接続プラグイン for Tera Term
Revisión | 937f376fa3aa678bf5cf61fa6c841703efd988cd (tree) |
---|---|
Tiempo | 2020-11-23 16:34:59 |
Autor | tomo3136 <tomo3136@loca...> |
Commiter | tomo3136 |
AutoComPortReconnectをttset構造体を使わずプラグイン側で参照
@@ -34,6 +34,7 @@ typedef struct | ||
34 | 34 | BOOL ConnectMsg; |
35 | 35 | BOOL Reconnect; |
36 | 36 | UINT ReconnectWait; |
37 | + WORD AutoComPortReconnect; | |
37 | 38 | |
38 | 39 | } TInstVar; |
39 | 40 |
@@ -65,6 +66,8 @@ static void PASCAL TTXReadIniFile(PCHAR fn, PTTSet ts) | ||
65 | 66 | (pvar->origReadIniFile)(fn, ts); |
66 | 67 | GetPrivateProfileString(INISECTION, "ReconnectWait", "", buf, sizeof(buf), fn); |
67 | 68 | pvar->ReconnectWait = atoi(buf); |
69 | + GetPrivateProfileString("Tera Term", "AutoComPortReconnect", "", buf, sizeof(buf), fn); | |
70 | + pvar->AutoComPortReconnect = (_strcmpi(buf, "on") == 0) ? TRUE : FALSE; | |
68 | 71 | } |
69 | 72 | |
70 | 73 | static void PASCAL TTXGetSetupHooks(TTXSetupHooks *hooks) |
@@ -143,7 +146,7 @@ static void PASCAL TTXOpenFile(TTXFileHooks *hooks) | ||
143 | 146 | Sleep(pvar->ReconnectWait); |
144 | 147 | } |
145 | 148 | } |
146 | - else if (pvar->ts->AutoComPortReconnect) | |
149 | + else if (pvar->AutoComPortReconnect) | |
147 | 150 | { |
148 | 151 | Sleep(pvar->ReconnectWait); |
149 | 152 | } |