forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'corristo/master'
This commit is contained in:
commit
130141ecac
8 changed files with 28 additions and 32 deletions
|
@ -83,10 +83,6 @@ set(OENGINE_OGRE
|
||||||
${LIBDIR}/openengine/ogre/imagerotate.cpp
|
${LIBDIR}/openengine/ogre/imagerotate.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
set(OENGINE_OGRE ${OENGINE_OGRE} ${LIBDIR}/openengine/ogre/osx_utils.mm)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set(OENGINE_GUI
|
set(OENGINE_GUI
|
||||||
${LIBDIR}/openengine/gui/manager.cpp
|
${LIBDIR}/openengine/gui/manager.cpp
|
||||||
)
|
)
|
||||||
|
|
4
extern/sdl4ogre/CMakeLists.txt
vendored
4
extern/sdl4ogre/CMakeLists.txt
vendored
|
@ -8,6 +8,10 @@ set(SDL4OGRE_SOURCE_FILES
|
||||||
sdlwindowhelper.cpp
|
sdlwindowhelper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
set(SDL4OGRE_SOURCE_FILES ${SDL4OGRE_SOURCE_FILES} osx_utils.mm)
|
||||||
|
endif ()
|
||||||
|
|
||||||
set(SDL4OGRE_HEADER_FILES
|
set(SDL4OGRE_HEADER_FILES
|
||||||
OISCompat.h
|
OISCompat.h
|
||||||
cursormanager.hpp
|
cursormanager.hpp
|
||||||
|
|
12
extern/sdl4ogre/osx_utils.h
vendored
Normal file
12
extern/sdl4ogre/osx_utils.h
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef SDL4OGRE_OSX_UTILS_H
|
||||||
|
#define SDL4OGRE_OSX_UTILS_H
|
||||||
|
|
||||||
|
#include <SDL_syswm.h>
|
||||||
|
|
||||||
|
namespace SFO {
|
||||||
|
|
||||||
|
extern unsigned long WindowContentViewHandle(SDL_SysWMinfo &info);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // SDL4OGRE_OSX_UTILS_H
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
#import <AppKit/NSWindow.h>
|
#import <AppKit/NSWindow.h>
|
||||||
|
|
||||||
namespace OEngine {
|
namespace SFO {
|
||||||
namespace Render {
|
|
||||||
|
|
||||||
unsigned long WindowContentViewHandle(SDL_SysWMinfo &info)
|
unsigned long WindowContentViewHandle(SDL_SysWMinfo &info)
|
||||||
{
|
{
|
||||||
|
@ -13,4 +12,3 @@ unsigned long WindowContentViewHandle(SDL_SysWMinfo &info)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
12
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
12
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
|
@ -119,20 +119,20 @@ namespace SFO
|
||||||
int w,h;
|
int w,h;
|
||||||
SDL_GetWindowSize(mSDLWindow, &w, &h);
|
SDL_GetWindowSize(mSDLWindow, &w, &h);
|
||||||
// TODO: Fix Ogre to handle this more consistently
|
// TODO: Fix Ogre to handle this more consistently
|
||||||
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
|
||||||
mOgreWindow->windowMovedOrResized();
|
|
||||||
#else
|
|
||||||
mOgreWindow->resize(w, h);
|
mOgreWindow->resize(w, h);
|
||||||
|
#else
|
||||||
|
mOgreWindow->windowMovedOrResized();
|
||||||
#endif
|
#endif
|
||||||
if (mWindowListener)
|
if (mWindowListener)
|
||||||
mWindowListener->windowResized(evt.window.data1, evt.window.data2);
|
mWindowListener->windowResized(evt.window.data1, evt.window.data2);
|
||||||
|
|
||||||
case SDL_WINDOWEVENT_RESIZED:
|
case SDL_WINDOWEVENT_RESIZED:
|
||||||
// TODO: Fix Ogre to handle this more consistently
|
// TODO: Fix Ogre to handle this more consistently
|
||||||
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
|
||||||
mOgreWindow->windowMovedOrResized();
|
|
||||||
#else
|
|
||||||
mOgreWindow->resize(evt.window.data1, evt.window.data2);
|
mOgreWindow->resize(evt.window.data1, evt.window.data2);
|
||||||
|
#else
|
||||||
|
mOgreWindow->windowMovedOrResized();
|
||||||
#endif
|
#endif
|
||||||
if (mWindowListener)
|
if (mWindowListener)
|
||||||
mWindowListener->windowResized(evt.window.data1, evt.window.data2);
|
mWindowListener->windowResized(evt.window.data1, evt.window.data2);
|
||||||
|
|
4
extern/sdl4ogre/sdlwindowhelper.cpp
vendored
4
extern/sdl4ogre/sdlwindowhelper.cpp
vendored
|
@ -6,6 +6,10 @@
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
#include <SDL_endian.h>
|
#include <SDL_endian.h>
|
||||||
|
|
||||||
|
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||||
|
#include "osx_utils.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace SFO
|
namespace SFO
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#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
|
|
|
@ -24,10 +24,6 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
|
||||||
#include "osx_utils.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace Ogre;
|
using namespace Ogre;
|
||||||
using namespace OEngine::Render;
|
using namespace OEngine::Render;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue