Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
d1ba6299
Commit
d1ba6299
authored
Mar 16, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wince: better volume slider behaviour.
parent
80fcc80f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
14 deletions
+38
-14
modules/gui/wince/interface.cpp
modules/gui/wince/interface.cpp
+30
-7
modules/gui/wince/timer.cpp
modules/gui/wince/timer.cpp
+3
-6
modules/gui/wince/wince.h
modules/gui/wince/wince.h
+5
-1
No files found.
modules/gui/wince/interface.cpp
View file @
d1ba6299
...
...
@@ -108,7 +108,7 @@ Interface::Interface()
:
hwndMain
(
0
),
hwndCB
(
0
),
hwndTB
(
0
),
hwndSlider
(
0
),
hwndLabel
(
0
),
hwndVol
(
0
),
hwndSB
(
0
),
fileinfo
(
0
),
messages
(
0
),
preferences
(
0
),
playlist
(
0
),
timer
(
0
),
open
(
0
),
video
(
0
)
timer
(
0
),
open
(
0
),
video
(
0
)
,
b_volume_hold
(
0
)
{
}
...
...
@@ -915,17 +915,34 @@ void Interface::OnChange( int wp )
if
(
LOWORD
(
wp
)
==
SB_THUMBPOSITION
||
LOWORD
(
wp
)
==
SB_ENDSCROLL
)
{
Change
(
200
-
(
int
)
dwPos
);
VolumeChange
(
200
-
(
int
)
dwPos
);
b_volume_hold
=
VLC_FALSE
;
}
else
{
b_volume_hold
=
VLC_TRUE
;
}
}
void
Interface
::
Change
(
int
i_volume
)
void
Interface
::
Volume
Change
(
int
i_volume
)
{
aout_VolumeSet
(
p_intf
,
i_volume
*
AOUT_VOLUME_MAX
/
200
/
2
);
#if 0
SetToolTip( wxString::Format((wxString)wxU(_("Volume")) + wxT(" %d"),
i_volume ) );
#endif
}
void
Interface
::
VolumeUpdate
()
{
audio_volume_t
i_volume
;
if
(
b_volume_hold
)
return
;
aout_VolumeGet
(
p_intf
,
&
i_volume
);
int
i_volume_ctrl
=
200
-
i_volume
*
200
*
2
/
AOUT_VOLUME_MAX
;
DWORD
dwPos
=
SendMessage
(
hwndVol
,
TBM_GETPOS
,
0
,
0
);
if
(
i_volume_ctrl
==
(
int
)
dwPos
)
return
;
SendMessage
(
hwndVol
,
TBM_SETPOS
,
1
,
i_volume_ctrl
);
}
void
Interface
::
OnStopStream
(
void
)
...
...
@@ -982,3 +999,9 @@ void Interface::OnFastStream( void )
var_Set
(
p_input
,
"rate-faster"
,
val
);
vlc_object_release
(
p_input
);
}
void
Interface
::
Update
()
{
/* Misc updates */
VolumeUpdate
();
}
modules/gui/wince/timer.cpp
View file @
d1ba6299
...
...
@@ -118,12 +118,6 @@ void Timer::Notify( void )
p_main_interface
->
TogglePlayButton
(
PLAYING_S
);
i_old_playing_status
=
PLAYING_S
;
/* Take care of the volume */
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_intf
,
&
i_volume
);
SendMessage
(
p_main_interface
->
hwndVol
,
TBM_SETPOS
,
1
,
200
-
(
i_volume
*
200
*
2
/
AOUT_VOLUME_MAX
)
);
}
}
else
if
(
p_intf
->
p_sys
->
p_input
->
b_dead
)
...
...
@@ -183,6 +177,9 @@ void Timer::Notify( void )
}
}
/* Take care of the volume, etc... */
p_main_interface
->
Update
();
/* Manage Playing status */
var_Get
(
p_input
,
"state"
,
&
val
);
if
(
i_old_playing_status
!=
val
.
i_int
)
...
...
modules/gui/wince/wince.h
View file @
d1ba6299
...
...
@@ -141,6 +141,7 @@ public:
HWND
CreateMenuBar
(
HWND
,
HINSTANCE
);
void
TogglePlayButton
(
int
i_playing_status
);
void
Update
();
HWND
hwndMain
;
// Handle to the main window.
...
...
@@ -171,7 +172,8 @@ protected:
void
OnSliderUpdate
(
int
wp
);
void
OnChange
(
int
wp
);
void
Change
(
int
i_volume
);
void
VolumeChange
(
int
i_volume
);
void
VolumeUpdate
(
void
);
void
OnStopStream
(
void
);
void
OnPrevStream
(
void
);
void
OnNextStream
(
void
);
...
...
@@ -185,6 +187,8 @@ private:
HMENU
menu_video
;
HMENU
menu_audio
;
HMENU
menu_navigation
;
vlc_bool_t
b_volume_hold
;
};
/* File Info */
...
...
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