Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README-main-functions.md #11491

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anakin004
Copy link

Summary of Changes:

Formatted a set of best practices and guidelines related to using SDL (Simple DirectMedia Layer) for managing entry points, callbacks, platform-specific considerations, and when to include or skip SDL_main.h.

Description:

The changes involve outlining several SDL-specific best practices, which include:

  • Always including SDL_main.h in one source file to prevent conflicts.
  • Avoiding redefinition of the main function when using SDL’s entry point system.
  • Using SDL’s callback system for more complex applications that require event handling and control over the app’s flow.
  • Platform-specific considerations, such as SDL handling platform-specific entry points on Windows.
  • Guidance on when to omit SDL_main.h, such as when integrating SDL into an existing application or scripting environment.

These practices are intended to ensure the stability and compatibility of SDL applications across different platforms and setups.

Existing Issue(s):

This change does not fix an open issue but provides guidance on SDL best practices for future development.

@sezero sezero requested a review from icculus November 17, 2024 22:31
@slouken slouken added this to the 3.2.0 milestone Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants