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 e5ecddf commit 86b3ba2
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions src/platforms/rcore_ios.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void PollInputEvents(void)
CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
}

// TODO: Poll input events for iOS
// Poll input events for iOS
// https://developer.apple.com/documentation/uikit/touches_presses_and_gestures
}

Expand Down Expand Up @@ -542,7 +542,7 @@ int InitPlatform(void)
if (platform.context == EGL_NO_CONTEXT)
{
TRACELOG(LOG_WARNING, "DISPLAY: Failed to create EGL context");
return -1;
return false;
}

// Create an EGL window surface
Expand All @@ -563,7 +563,7 @@ int InitPlatform(void)
if (eglMakeCurrent(platform.device, platform.surface, platform.surface, platform.context) == EGL_FALSE)
{
TRACELOG(LOG_WARNING, "DISPLAY: Failed to attach EGL rendering context to EGL surface");
return -1;
return false;
}
else
{
Expand All @@ -583,15 +583,7 @@ int InitPlatform(void)
// Load OpenGL extensions
// NOTE: GL procedures address loader is required to load extensions
rlLoadExtensions(eglGetProcAddress);

CORE.Window.ready = true;

// TODO: Initialize input events system
// It could imply keyboard, mouse, gamepad, touch...
// Depending on the platform libraries/SDK it could use a callback mechanism
// For system events and inputs evens polling on a per-frame basis, use PollInputEvents()
//----------------------------------------------------------------------------
// ...
//----------------------------------------------------------------------------
// Initialize OpenGL context (states and resources)
// NOTE: CORE.Window.currentFbo.width and CORE.Window.currentFbo.height not used, just stored as globals in rlgl
Expand All @@ -600,20 +592,10 @@ int InitPlatform(void)
// Setup default viewport
// NOTE: It updated CORE.Window.render.width and CORE.Window.render.height
SetupViewport(CORE.Window.currentFbo.width, CORE.Window.currentFbo.height);

// TODO: Initialize timing system
//----------------------------------------------------------------------------
InitTimer();
//----------------------------------------------------------------------------

// TODO: Initialize storage system
//----------------------------------------------------------------------------
CORE.Storage.basePath = GetWorkingDirectory();
//----------------------------------------------------------------------------

TRACELOG(LOG_INFO, "PLATFORM: IOS: Initialized successfully");

return 0;
return true;
}

// Close platform
Expand Down

0 comments on commit 86b3ba2

Please sign in to comment.