Browse Source

docs: Added some notes about iOS and the main callbacks.

Ryan C. Gordon 1 year ago
parent
commit
239b34d760
2 changed files with 15 additions and 1 deletions
  1. 6 0
      docs/README-ios.md
  2. 9 1
      include/SDL3/SDL_system.h

+ 6 - 0
docs/README-ios.md

@@ -117,6 +117,9 @@ e.g.
     }
 
 
+Note that if you are using main callbacks instead of a standard C main() function, your SDL_AppEvent() callback will run as these events arrive and you do not need to use SDL_SetEventFilter.
+
+
 Notes -- Accelerometer as Joystick
 ==============================================================================
 
@@ -255,6 +258,9 @@ e.g.
     }
 
 
+Note that if you are using main callbacks instead of a standard C main() function, your SDL_AppIterate() callback is already doing this and you don't need to use SDL_iOSSetAnimationCallback.
+
+
 Deploying to older versions of iOS
 ==============================================================================
 

+ 9 - 1
include/SDL3/SDL_system.h

@@ -179,7 +179,15 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID,
  * This function is only available on Apple iOS.
  *
  * For more information see:
- * https://github.com/libsdl-org/SDL/blob/main/docs/README-ios.md
+ *
+ * https://wiki.libsdl.org/SDL3/README/ios
+ *
+ * Note that if you use the "main callbacks" instead of a standard C `main`
+ * function, you don't have to use this API, as SDL will manage this for you.
+ *
+ * Details on main callbacks are here:
+ *
+ * https://wiki.libsdl.org/SDL3/README/main-functions
  *
  * \param window the window for which the animation callback should be set
  * \param interval the number of frames after which **callback** will be