Commit 14cc1eed 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)
parent 894f53f2
......@@ -80,6 +80,8 @@
NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
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;
NSTimeInterval last_fwd_event;
NSTimeInterval last_bwd_event;
}
- (id)initWithFrame: (NSRect)frameRect;
- (void)drawRect: (NSRect)rect;
......
......@@ -429,6 +429,8 @@
/*
addButton( o_button, @"image (off state)", @"image (on state)", 38, 51, something );
*/
[o_fwd setContinuous:YES];
[o_bwd setContinuous:YES];
/* time slider */
s_rc = [self frame];
......@@ -543,12 +545,22 @@
- (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
{
[[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
......
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