forked from teamnwah/openmw-tes3coop
SDL2 input: seems to work on OS X, has some input issues though
parent
3fded2d8bf
commit
6abb7a18b0
@ -0,0 +1,14 @@
|
||||
#ifndef OENGINE_OGRE_OSX_UTILS_H
|
||||
#define OENGINE_OGRE_OSX_UTILS_H
|
||||
|
||||
#include <SDL_syswm.h>
|
||||
|
||||
namespace OEngine {
|
||||
namespace Render {
|
||||
|
||||
extern unsigned long WindowContentViewHandle(SDL_SysWMinfo &info);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,16 @@
|
||||
#include "osx_utils.h"
|
||||
|
||||
#import <AppKit/NSWindow.h>
|
||||
|
||||
namespace OEngine {
|
||||
namespace Render {
|
||||
|
||||
unsigned long WindowContentViewHandle(SDL_SysWMinfo &info)
|
||||
{
|
||||
NSWindow *window = info.info.cocoa.window;
|
||||
NSView *view = [window contentView];
|
||||
return (unsigned long)view;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue