Fixed build errors when OpenGL isn't enabled
parent
35ad68e126
commit
d3bcc3f057
|
@ -1151,7 +1151,6 @@ retry:
|
|||
SDL_LockMutex(Android_ActivityMutex);
|
||||
|
||||
if (Android_Window) {
|
||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||
SDL_WindowData *data = Android_Window->driverdata;
|
||||
|
||||
/* Wait for Main thread being paused and context un-activated to release 'egl_surface' */
|
||||
|
@ -1168,7 +1167,7 @@ retry:
|
|||
|
||||
#ifdef SDL_VIDEO_OPENGL_EGL
|
||||
if (data->egl_surface != EGL_NO_SURFACE) {
|
||||
SDL_EGL_DestroySurface(_this, data->egl_surface);
|
||||
SDL_EGL_DestroySurface(SDL_GetVideoDevice(), data->egl_surface);
|
||||
data->egl_surface = EGL_NO_SURFACE;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -155,9 +155,12 @@ class SDL_BWin : public BWindow
|
|||
|
||||
void UpdateCurrentView()
|
||||
{
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
if (_SDL_GLView != NULL) {
|
||||
SetCurrentView(_SDL_GLView);
|
||||
} else if (_SDL_View != NULL) {
|
||||
} else
|
||||
#endif
|
||||
if (_SDL_View != NULL) {
|
||||
SetCurrentView(_SDL_View);
|
||||
} else {
|
||||
SetCurrentView(NULL);
|
||||
|
@ -454,10 +457,13 @@ class SDL_BWin : public BWindow
|
|||
delete pendingMessage;
|
||||
}
|
||||
if (_bitmap != NULL) {
|
||||
if (_SDL_View != NULL && _cur_view == _SDL_View)
|
||||
_SDL_View->Draw(Bounds());
|
||||
else if (_SDL_GLView != NULL && _cur_view == _SDL_GLView) {
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
if (_SDL_GLView != NULL && _cur_view == _SDL_GLView) {
|
||||
_SDL_GLView->CopyPixelsIn(_bitmap, B_ORIGIN);
|
||||
} else
|
||||
#endif
|
||||
if (_SDL_View != NULL && _cur_view == _SDL_View) {
|
||||
_SDL_View->Draw(Bounds());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -423,7 +423,6 @@ int X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
|||
SDL_WindowData *windowdata;
|
||||
Display *display = data->display;
|
||||
int screen = displaydata->screen;
|
||||
const int transparent = (window->flags & SDL_WINDOW_TRANSPARENT) ? SDL_TRUE : SDL_FALSE;
|
||||
Visual *visual;
|
||||
int depth;
|
||||
XSetWindowAttributes xattr;
|
||||
|
@ -443,6 +442,7 @@ int X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
|||
SDL_bool undefined_position = SDL_FALSE;
|
||||
|
||||
#if defined(SDL_VIDEO_OPENGL_GLX) || defined(SDL_VIDEO_OPENGL_EGL)
|
||||
const int transparent = (window->flags & SDL_WINDOW_TRANSPARENT) ? SDL_TRUE : SDL_FALSE;
|
||||
const char *forced_visual_id = SDL_GetHint(SDL_HINT_VIDEO_X11_WINDOW_VISUALID);
|
||||
|
||||
if (forced_visual_id != NULL && forced_visual_id[0] != '\0') {
|
||||
|
|
Loading…
Reference in New Issue