mirror of
https://github.com/yawut/SDL.git
synced 2026-08-02 00:15:12 -05:00
Fixed bug 1342 - SDL_CreateRenderer creates OpenGL ES 2.0 renderer in iPhone 3G using default index (-1)
The uikit code wasn't checking to make sure the context was successfully created.
This commit is contained in:
parent
da31e3d3e3
commit
305531d766
|
|
@ -115,6 +115,9 @@ SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
|
|||
depthBits: _this->gl_config.depth_size
|
||||
stencilBits: _this->gl_config.stencil_size
|
||||
majorVersion: _this->gl_config.major_version];
|
||||
if (!view) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->view = view;
|
||||
view->viewcontroller = data->viewcontroller;
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
}
|
||||
if (!context || ![EAGLContext setCurrentContext:context]) {
|
||||
[self release];
|
||||
SDL_SetError("OpenGL ES %d not supported", majorVersion);
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user