diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2011-12-04 21:53:43 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2011-12-06 23:11:50 +0100 |
commit | b2a41e20be6c1831543e72987ce7d285655fc311 (patch) | |
tree | ccc6c6ba44ab1491191413ae3358bdba1007a780 /libvo/cocoa_common.m | |
parent | bd8ba89cca217cc78df31a357f77220a618a9b9a (diff) |
vo_gl: cocoa: point swapinterval to cocoa_common function
Currently there is no way to set the swap interval with a function
that has a signature compatible with other platforms' gl extensions.
Make a wrapper function around the gui toolkit method of setting the
swap interval property, and point gl->SwapInterval to it.
Diffstat (limited to 'libvo/cocoa_common.m')
-rw-r--r-- | libvo/cocoa_common.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m index c509dbcf39..5658ecb7bf 100644 --- a/libvo/cocoa_common.m +++ b/libvo/cocoa_common.m @@ -262,6 +262,12 @@ void vo_cocoa_fullscreen(struct vo *vo) resize_window(vo); } +int vo_cocoa_swap_interval(int enabled) +{ + [s->glContext setValues:&enabled forParameter:NSOpenGLCPSwapInterval]; + return 0; +} + void create_menu() { NSMenu *menu; |