mirror of
https://github.com/encounter/SDL.git
synced 2025-12-14 23:56:19 +00:00
haiku: Fixed compiling without OpenGL support.
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
#define SDL_BAPP_H
|
||||
|
||||
#include <InterfaceKit.h>
|
||||
#if SDL_VIDEO_OPENGL
|
||||
#include <OpenGLKit.h>
|
||||
#endif
|
||||
|
||||
#include "../../video/haiku/SDL_bkeyboard.h"
|
||||
|
||||
@@ -80,7 +82,9 @@ class SDL_BApp : public BApplication {
|
||||
public:
|
||||
SDL_BApp(const char* signature) :
|
||||
BApplication(signature) {
|
||||
#if SDL_VIDEO_OPENGL
|
||||
_current_context = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -188,6 +192,7 @@ public:
|
||||
return _window_map[winID];
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_OPENGL
|
||||
void SetCurrentContext(BGLView *newContext) {
|
||||
if(_current_context)
|
||||
_current_context->UnlockGL();
|
||||
@@ -195,6 +200,8 @@ public:
|
||||
if (_current_context)
|
||||
_current_context->LockGL();
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
/* Event management */
|
||||
void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) {
|
||||
@@ -384,7 +391,9 @@ private:
|
||||
/* Members */
|
||||
std::vector<SDL_Window*> _window_map; /* Keeps track of SDL_Windows by index-id */
|
||||
|
||||
#if SDL_VIDEO_OPENGL
|
||||
BGLView *_current_context;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user