Skip to content

Commit dcbad25

Browse files
committed
Fix fan slider edit value
1 parent d36ca94 commit dcbad25

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

irFFB/fan.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,8 @@ void Fan::setSpeedUnits(int u) {
186186
return;
187187

188188
units = u;
189-
wchar_t buf[16];
190-
if (SendMessageW(instance->maxSpeedWnd, WM_GETTEXT, 16, LPARAM(buf)))
191-
maxSpeed = StrToInt(buf);
189+
if (SendMessageW(instance->maxSpeedWnd, WM_GETTEXT, 16, LPARAM(strbuf)))
190+
maxSpeed = StrToInt(strbuf);
192191
setMaxSpeed(maxSpeed);
193192
SendMessage(speedUnitsWnd, CB_SETCURSEL, u, 0);
194193

@@ -218,7 +217,7 @@ void Fan::setMaxSpeed(int s) {
218217
void Fan::setManualSpeed(int s) {
219218

220219
SendMessage(manualWnd->trackbar, TBM_SETPOS, TRUE, s);
221-
swprintf_s(strbuf, L"Manual fan speed [ %d ]", s);
220+
swprintf_s(strbuf, L"%d", s);
222221
SendMessage(manualWnd->value, WM_SETTEXT, NULL, LPARAM(strbuf));
223222
manualSpeed = (float)s;
224223
setSpeed(manualSpeed * maxSpeedMs / 100);

0 commit comments

Comments
 (0)