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
@ -69,11 +69,28 @@ SFOpenGLView* getSFOpenGLViewFromSFMLWindow(const Window& window)
|
|||||||
|
|
||||||
// Subview doesn't match ?
|
// Subview doesn't match ?
|
||||||
if (![view isKindOfClass:[SFOpenGLView class]])
|
if (![view isKindOfClass:[SFOpenGLView class]])
|
||||||
|
{
|
||||||
|
if([view isKindOfClass:[NSView class]])
|
||||||
|
{
|
||||||
|
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"
|
sf::err() << "The content view is not a valid SFOpenGLView"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
view = nil;
|
view = nil;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ([nsHandle isKindOfClass:[NSView class]])
|
else if ([nsHandle isKindOfClass:[NSView class]])
|
||||||
|
Loading…
Reference in New Issue
Block a user