win_settings: fix progress bar in new disk image dialog

This commit is contained in:
GH Cao
2020-02-04 22:11:14 +08:00
parent 8e8492baed
commit 382c606483

View File

@@ -2789,7 +2789,7 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
if (r) {
for (i = 0; i < r; i++) {
fwrite(big_buf, 1, 1048576, f);
SendMessage(h, PBM_SETPOS, (WPARAM) (size + 1), (LPARAM) 0);
SendMessage(h, PBM_SETPOS, (WPARAM) (i + 1), (LPARAM) 0);
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD)) {
TranslateMessage(&msg);