Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug 1342 - SDL_CreateRenderer creates OpenGL ES 2.0 renderer in…
Browse files Browse the repository at this point in the history
… iPhone 3G using default index (-1)

The uikit code wasn't checking to make sure the context was successfully created.
  • Loading branch information
slouken committed Jan 8, 2012
1 parent e326166 commit 9113776
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/uikit/SDL_uikitopengles.m
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/video/uikit/SDL_uikitopenglview.m
Expand Up @@ -75,6 +75,7 @@ - (id)initWithFrame:(CGRect)frame
}
if (!context || ![EAGLContext setCurrentContext:context]) {
[self release];
SDL_SetError("OpenGL ES %d not supported", majorVersion);
return nil;
}

Expand Down

0 comments on commit 9113776

Please sign in to comment.