mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
More cleanup
This commit is contained in:
parent
289587b1a9
commit
5252ffa104
4 changed files with 1 additions and 59 deletions
|
@ -9,7 +9,6 @@
|
|||
#include <MyGUI_RenderManager.h>
|
||||
#include <MyGUI_Widget.h>
|
||||
#include <MyGUI_Button.h>
|
||||
#include <MyGUI_PointerManager.h>
|
||||
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include <OgreControllerManager.h>
|
||||
#include <OgreMeshManager.h>
|
||||
|
||||
#include "SDL2/SDL.h"
|
||||
|
||||
#include <extern/shiny/Main/Factory.hpp>
|
||||
#include <extern/shiny/Platforms/Ogre/OgrePlatform.hpp>
|
||||
|
||||
|
|
55
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
55
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
|
@ -30,6 +30,7 @@ namespace SFO
|
|||
{
|
||||
_setupOISKeys();
|
||||
|
||||
// FIXME: text input should only be enabled when a text input widget currently has focus
|
||||
SDL_StartTextInput();
|
||||
}
|
||||
|
||||
|
@ -42,60 +43,6 @@ namespace SFO
|
|||
SDL_StopTextInput();
|
||||
}
|
||||
|
||||
/*
|
||||
void InputWrapper::initFromRenderWindow(Ogre::RenderWindow *win)
|
||||
{
|
||||
assert(mSDLWindow == NULL);
|
||||
|
||||
mOwnWindow = true;
|
||||
|
||||
//get the HWND from ogre's renderwindow
|
||||
size_t windowHnd;
|
||||
win->getCustomAttribute("WINDOW", &windowHnd);
|
||||
|
||||
//wrap our own event handler around ogre's
|
||||
mSDLWindow = SDL_CreateWindowFrom((void*)windowHnd);
|
||||
|
||||
assert(mSDLWindow != NULL);
|
||||
|
||||
//without this SDL will take ownership of the window and iconify it when
|
||||
//we alt-tab away.
|
||||
//SDL_SetWindowFullscreen(mSDLWindow, 0);
|
||||
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
|
||||
//linux-specific event-handling fixups
|
||||
//see http://bugzilla.libsdl.org/show_bug.cgi?id=730
|
||||
SDL_SysWMinfo wm_info;
|
||||
SDL_VERSION(&wm_info.version);
|
||||
|
||||
if(SDL_GetWindowWMInfo(mSDLWindow,&wm_info))
|
||||
{
|
||||
Display* display = wm_info.info.x11.display;
|
||||
Window w = wm_info.info.x11.window;
|
||||
|
||||
// Set the input hints so we get keyboard input
|
||||
XWMHints *wmhints = XAllocWMHints();
|
||||
if (wmhints) {
|
||||
wmhints->input = True;
|
||||
wmhints->flags = InputHint;
|
||||
XSetWMHints(display, w, wmhints);
|
||||
XFree(wmhints);
|
||||
}
|
||||
|
||||
//make sure to subscribe to XLib's events
|
||||
XSelectInput(display, w,
|
||||
(FocusChangeMask | EnterWindowMask | LeaveWindowMask |
|
||||
ExposureMask | ButtonPressMask | ButtonReleaseMask |
|
||||
PointerMotionMask | KeyPressMask | KeyReleaseMask |
|
||||
PropertyChangeMask | StructureNotifyMask |
|
||||
KeymapStateMask));
|
||||
|
||||
XFlush(display);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
void InputWrapper::capture()
|
||||
{
|
||||
SDL_Event evt;
|
||||
|
|
2
extern/sdl4ogre/sdlinputwrapper.hpp
vendored
2
extern/sdl4ogre/sdlinputwrapper.hpp
vendored
|
@ -19,8 +19,6 @@ namespace SFO
|
|||
InputWrapper(SDL_Window *window, Ogre::RenderWindow* ogreWindow);
|
||||
~InputWrapper();
|
||||
|
||||
//void initFromRenderWindow(Ogre::RenderWindow* win);
|
||||
|
||||
void setMouseEventCallback(MouseListener* listen) { mMouseListener = listen; }
|
||||
void setKeyboardEventCallback(KeyListener* listen) { mKeyboardListener = listen; }
|
||||
void setWindowEventCallback(WindowListener* listen) { mWindowListener = listen; }
|
||||
|
|
Loading…
Reference in a new issue