Skip to content

Commit

Permalink
Update rcore_ios.c
Browse files Browse the repository at this point in the history
  • Loading branch information
blueloveTH committed Mar 27, 2024
1 parent 2e29d3f commit ee2a307
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/platforms/rcore_ios.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ Vector2 GetWindowPosition(void)
// Get window scale DPI factor for current monitor
Vector2 GetWindowScaleDPI(void)
{
TRACELOG(LOG_WARNING, "GetWindowScaleDPI() not implemented on target platform");
return (Vector2){ 1.0f, 1.0f };
}

Expand Down Expand Up @@ -457,11 +456,13 @@ void PollInputEvents(void)
// Initialize platform: graphics, inputs and more
int InitPlatform(void)
{
CORE.Window.display.width = [[UIScreen mainScreen] nativeBounds].size.width;
CORE.Window.display.height = [[UIScreen mainScreen] nativeBounds].size.height;
if(CORE.Window.screen.width == 0){
CORE.Window.screen.width = platform.viewController.view.frame.size.width;
CORE.Window.screen.width = [[UIScreen mainScreen] bounds].size.width;
}
if(CORE.Window.screen.height == 0){
CORE.Window.screen.height = platform.viewController.view.frame.size.height;
CORE.Window.screen.height = [[UIScreen mainScreen] bounds].size.height;
}

long long orientation = [[UIApplication sharedApplication] statusBarOrientation];
Expand Down Expand Up @@ -577,8 +578,8 @@ int InitPlatform(void)
TRACELOG(LOG_INFO, " > Screen size: %i x %i", CORE.Window.screen.width, CORE.Window.screen.height);
TRACELOG(LOG_INFO, " > Render size: %i x %i", CORE.Window.render.width, CORE.Window.render.height);
TRACELOG(LOG_INFO, " > Viewport offsets: %i, %i", CORE.Window.renderOffset.x, CORE.Window.renderOffset.y);
TRACELOG(LOG_WARNING, " > GL: %s", glGetString(GL_VERSION));
TRACELOG(LOG_WARNING, " > EGL: %s", eglQueryString(platform.device, EGL_VERSION));
TRACELOG(LOG_INFO, " > GL: %s", glGetString(GL_VERSION));
TRACELOG(LOG_INFO, " > EGL: %s", eglQueryString(platform.device, EGL_VERSION));
}
//----------------------------------------------------------------------------
// Load OpenGL extensions
Expand Down

0 comments on commit ee2a307

Please sign in to comment.