Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
df878035
Commit
df878035
authored
Oct 29, 2009
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Limit the progress to its maximal value, use MulDiv for better results.
parent
37f3f3d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
dialog.c
dlls/msi/dialog.c
+6
-2
No files found.
dlls/msi/dialog.c
View file @
df878035
...
@@ -606,6 +606,8 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
...
@@ -606,6 +606,8 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
func
=
MSI_RecordGetInteger
(
rec
,
1
);
func
=
MSI_RecordGetInteger
(
rec
,
1
);
val
=
MSI_RecordGetInteger
(
rec
,
2
);
val
=
MSI_RecordGetInteger
(
rec
,
2
);
TRACE
(
"progress: func %u, val %u
\n
"
,
func
,
val
);
switch
(
func
)
switch
(
func
)
{
{
case
0
:
/* init */
case
0
:
/* init */
...
@@ -618,10 +620,12 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
...
@@ -618,10 +620,12 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
break
;
break
;
case
2
:
/* move */
case
2
:
/* move */
ctrl
->
progress_current
+=
val
;
ctrl
->
progress_current
+=
val
;
SendMessageW
(
ctrl
->
hwnd
,
PBM_SETPOS
,
100
*
(
ctrl
->
progress_current
/
ctrl
->
progress_max
),
0
);
if
(
ctrl
->
progress_current
>
ctrl
->
progress_max
)
ctrl
->
progress_current
=
ctrl
->
progress_max
;
SendMessageW
(
ctrl
->
hwnd
,
PBM_SETPOS
,
MulDiv
(
100
,
ctrl
->
progress_current
,
ctrl
->
progress_max
),
0
);
break
;
break
;
default:
default:
ERR
(
"Unknown progress message %d
\n
"
,
func
);
FIXME
(
"Unknown progress message %u
\n
"
,
func
);
break
;
break
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment