Merge remote-tracking branch 'corristo/master'

actorid
Marc Zinnschlag 12 years ago
commit b8cd3f3915

@ -1,13 +1,14 @@
#include "osx_utils.h" #include "osx_utils.h"
#import <AppKit/NSWindow.h> #import <AppKit/NSWindow.h>
namespace SFO { namespace SFO {
unsigned long WindowContentViewHandle(SDL_SysWMinfo &info) unsigned long WindowContentViewHandle(SDL_SysWMinfo &info)
{ {
NSWindow *window = info.info.cocoa.window; NSWindow *window = info.info.cocoa.window;
NSView *view = [window contentView]; NSView *view = [window contentView];
return (unsigned long)view; return (unsigned long)view;
} }

@ -126,6 +126,7 @@ namespace SFO
#endif #endif
if (mWindowListener) if (mWindowListener)
mWindowListener->windowResized(evt.window.data1, evt.window.data2); mWindowListener->windowResized(evt.window.data1, evt.window.data2);
break;
case SDL_WINDOWEVENT_RESIZED: case SDL_WINDOWEVENT_RESIZED:
// TODO: Fix Ogre to handle this more consistently // TODO: Fix Ogre to handle this more consistently

@ -21,7 +21,7 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h,
struct SDL_SysWMinfo wmInfo; struct SDL_SysWMinfo wmInfo;
SDL_VERSION(&wmInfo.version); SDL_VERSION(&wmInfo.version);
if (SDL_GetWindowWMInfo(mSDLWindow, &wmInfo) == -1) if (SDL_GetWindowWMInfo(mSDLWindow, &wmInfo) == SDL_FALSE)
throw std::runtime_error("Couldn't get WM Info!"); throw std::runtime_error("Couldn't get WM Info!");
Ogre::String winHandle; Ogre::String winHandle;

Loading…
Cancel
Save