Fixed an issue in InputImpl::getSFOpenGLViewFromSFMLWindow failing to retrieve the SFOpenGLView from the contentview's subview when using fullscreen (see issue #782).
This commit is contained in:
parent
1f2bc148fe
commit
d83ddd56e3
@ -70,9 +70,26 @@ SFOpenGLView* getSFOpenGLViewFromSFMLWindow(const Window& window)
|
|||||||
// Subview doesn't match ?
|
// Subview doesn't match ?
|
||||||
if (![view isKindOfClass:[SFOpenGLView class]])
|
if (![view isKindOfClass:[SFOpenGLView class]])
|
||||||
{
|
{
|
||||||
sf::err() << "The content view is not a valid SFOpenGLView"
|
if([view isKindOfClass:[NSView class]])
|
||||||
<< std::endl;
|
{
|
||||||
view = nil;
|
NSArray* subviews = [view subviews];
|
||||||
|
for (NSView* subview in subviews)
|
||||||
|
{
|
||||||
|
if ([subview isKindOfClass:[SFOpenGLView class]])
|
||||||
|
{
|
||||||
|
view = (SFOpenGLView*)subview;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sf::err() << "The content view is not a valid SFOpenGLView"
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
view = nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user