diff options
| author | Juan Linietsky | 2015-02-09 21:38:43 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-02-09 21:38:43 -0300 |
| commit | f53b27dca33e00cfc5f05d3dbaf58c0f97ff28bf (patch) | |
| tree | 933eeb7e790cedceac04886a60e66cb300895532 | |
| parent | b1ec72a799af9fc608d84fb1ac7613c8eba7670d (diff) | |
| parent | f9d63a7683a1c214c7d24809fef4d3d363cc61be (diff) | |
| download | godot-f53b27dca33e00cfc5f05d3dbaf58c0f97ff28bf.tar.gz godot-f53b27dca33e00cfc5f05d3dbaf58c0f97ff28bf.tar.zst godot-f53b27dca33e00cfc5f05d3dbaf58c0f97ff28bf.zip | |
| -rw-r--r-- | platform/iphone/app_delegate.mm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm index 6ca54286b..fe11b672a 100644 --- a/platform/iphone/app_delegate.mm +++ b/platform/iphone/app_delegate.mm @@ -84,13 +84,11 @@ static int frame_count = 0; switch (frame_count) { case 0: { - - int backingWidth; - int backingHeight; - glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); - glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); - - iphone_main(backingWidth, backingHeight, gargc, gargv); + int backingWidth; + int backingHeight; + glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); + glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); + OS::VideoMode vm; vm.fullscreen = true; @@ -198,6 +196,13 @@ static int frame_count = 0; //glView.autoresizesSubviews = YES; //[glView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleWidth]; + int backingWidth; + int backingHeight; + glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); + glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); + + iphone_main(backingWidth, backingHeight, gargc, gargv); + view_controller = [[ViewController alloc] init]; view_controller.view = glView; window.rootViewController = view_controller; |
