Commit eb553091 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/fspanel: allow continued clicks on the backward/forward buttons like we...

macosx/fspanel: allow continued clicks on the backward/forward buttons like we do in windowed mode (close #7258)
(cherry picked from commit 14cc1eed64be69186f1076136fcc5154123b5b36)
parent e89094b1
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
NSTextField *o_streamTitle_txt, *o_streamPosition_txt; NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
NSSlider *o_fs_timeSlider, *o_fs_volumeSlider; NSSlider *o_fs_timeSlider, *o_fs_volumeSlider;
NSImage *o_background_img, *o_vol_sld_img, *o_vol_mute_img, *o_vol_max_img, *o_time_sld_img; NSImage *o_background_img, *o_vol_sld_img, *o_vol_mute_img, *o_vol_max_img, *o_time_sld_img;
NSTimeInterval last_fwd_event;
NSTimeInterval last_bwd_event;
} }
- (id)initWithFrame: (NSRect)frameRect; - (id)initWithFrame: (NSRect)frameRect;
- (void)drawRect: (NSRect)rect; - (void)drawRect: (NSRect)rect;
......
...@@ -429,6 +429,8 @@ ...@@ -429,6 +429,8 @@
/* /*
addButton( o_button, @"image (off state)", @"image (on state)", 38, 51, something ); addButton( o_button, @"image (off state)", @"image (on state)", 38, 51, something );
*/ */
[o_fwd setContinuous:YES];
[o_bwd setContinuous:YES];
/* time slider */ /* time slider */
s_rc = [self frame]; s_rc = [self frame];
...@@ -543,12 +545,22 @@ ...@@ -543,12 +545,22 @@
- (IBAction)forward:(id)sender - (IBAction)forward:(id)sender
{ {
[[VLCCoreInteraction sharedInstance] forward]; if (([NSDate timeIntervalSinceReferenceDate] - last_fwd_event) > 0.16 )
{
// we just skipped 4 "continous" events, otherwise we are too fast
[[VLCCoreInteraction sharedInstance] forwardExtraShort];
last_fwd_event = [NSDate timeIntervalSinceReferenceDate];
}
} }
- (IBAction)backward:(id)sender - (IBAction)backward:(id)sender
{ {
[[VLCCoreInteraction sharedInstance] backward]; if (([NSDate timeIntervalSinceReferenceDate] - last_bwd_event) > 0.16 )
{
// we just skipped 4 "continous" events, otherwise we are too fast
[[VLCCoreInteraction sharedInstance] backwardExtraShort];
last_bwd_event = [NSDate timeIntervalSinceReferenceDate];
}
} }
- (IBAction)prev:(id)sender - (IBAction)prev:(id)sender
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment