More OSX cocoa fixes. Call function with correct types instead of hacking around the type system to make the compiler happy.

Nicky 2014-05-29 19:07:03 +02:00
parent b4e7faee77
commit fcc517f8e1
1 changed files with 15 additions and 3 deletions

View File

@ -203,13 +203,25 @@ attributedStringInfo getSegments(NSAttributedString *str)
[glContext makeCurrentContext];
// <FS:ND> setValues needs a real pointer, not some integer that is castet into one
// if (vsync)
// {
// [glContext setValues:(const GLint*)1 forParameter:NSOpenGLCPSwapInterval];
// } else {
// [glContext setValues:(const GLint*)0 forParameter:NSOpenGLCPSwapInterval];
// }
GLint glVsync = 0;
if (vsync)
{
[glContext setValues:(const GLint*)1 forParameter:NSOpenGLCPSwapInterval];
} else {
[glContext setValues:(const GLint*)0 forParameter:NSOpenGLCPSwapInterval];
glVsync = 1;
}
[glContext setValues:&glVsync forParameter:NSOpenGLCPSwapInterval];
// </FS:ND>
return self;
}