diff options
Diffstat (limited to 'indra/llwindow/llwindowsdl.h')
-rw-r--r-- | indra/llwindow/llwindowsdl.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index 7193e6f45a..ce9ac44076 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -32,12 +32,15 @@ #include "llwindow.h" #include "lltimer.h" -#include "SDL/SDL.h" -#include "SDL/SDL_endian.h" +#if !defined(__i386__) && !defined(__x86_64__) +#define SDL_DISABLE_IMMINTRIN_H +#endif +#include "SDL2/SDL.h" +#include "SDL2/SDL_endian.h" #if LL_X11 // get X11-specific headers for use in low-level stuff like copy-and-paste support -#include "SDL/SDL_syswm.h" +#include "SDL2/SDL_syswm.h" #endif // AssertMacros.h does bad things. @@ -66,6 +69,10 @@ public: /*virtual*/ BOOL setSizeImpl(LLCoordScreen size); /*virtual*/ BOOL setSizeImpl(LLCoordWindow size); /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL); + /*virtual*/ void *createSharedContext(); + /*virtual*/ void makeContextCurrent(void* context); + /*virtual*/ void destroySharedContext(void* context); + /*virtual*/ void toggleVSync(bool enable_vsync); /*virtual*/ BOOL setCursorPosition(LLCoordWindow position); /*virtual*/ BOOL getCursorPosition(LLCoordWindow *position); /*virtual*/ void showCursor(); @@ -145,6 +152,10 @@ public: static Display* get_SDL_Display(void); #endif // LL_X11 +#if LL_DARWIN + static BOOL sUseMultGL; +#endif + protected: LLWindowSDL(LLWindowCallbacks* callbacks, const std::string& title, int x, int y, int width, int height, U32 flags, @@ -177,7 +188,7 @@ protected: void destroyContext(); void setupFailure(const std::string& text, const std::string& caption, U32 type); void fixWindowSize(void); - U32 SDLCheckGrabbyKeys(SDLKey keysym, BOOL gain); + U32 SDLCheckGrabbyKeys(SDL_Keycode keysym, BOOL gain); BOOL SDLReallyCaptureInput(BOOL capture); // @@ -185,7 +196,7 @@ protected: // U32 mGrabbyKeyFlags; int mReallyCapturedCount; - SDL_Surface * mWindow; + SDL_Window * mWindow; std::string mWindowTitle; double mOriginalAspectRatio; BOOL mNeedsResize; // Constructor figured out the window is too big, it needs a resize. @@ -211,7 +222,7 @@ private: U32 mKeyScanCode; U32 mKeyVirtualKey; - SDLMod mKeyModifiers; + Uint16 mKeyModifiers; }; |