summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2024-02-01 00:03:06 +0100
committerRay <[email protected]>2024-02-01 00:03:06 +0100
commitd79828076f4c99e750cb2b9f729a753cfe87dc00 (patch)
treec348baa806086370206722ae4bfe7e3cba59adf6 /src
parentdeaffb06981b95976f7b055dc1085adb933a37cc (diff)
downloadraylib-d79828076f4c99e750cb2b9f729a753cfe87dc00.tar.gz
raylib-d79828076f4c99e750cb2b9f729a753cfe87dc00.zip
REVIEWED: macOS issues #3767
Diffstat (limited to 'src')
-rw-r--r--src/platforms/rcore_desktop_sdl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c
index 325cee39..7b386b2c 100644
--- a/src/platforms/rcore_desktop_sdl.c
+++ b/src/platforms/rcore_desktop_sdl.c
@@ -1275,8 +1275,9 @@ void PollInputEvents(void)
// Initialize platform: graphics, inputs and more
int InitPlatform(void)
{
- // Initialize SDL internal global state
- int result = SDL_Init(SDL_INIT_EVERYTHING);
+ // Initialize SDL internal global state, only required systems
+ // NOTE: Not all systems need to be initialized, SDL_INIT_AUDIO is not required, managed by miniaudio
+ int result = SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_EVENTS | SDL_INIT_GAMECONTROLLER);
if (result < 0) { TRACELOG(LOG_WARNING, "SDL: Failed to initialize SDL"); return -1; }
// Initialize graphic device: display/window and graphic context
@@ -1328,11 +1329,7 @@ int InitPlatform(void)
{
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
-#if defined(__APPLE__)
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // OSX Requires forward compatibility
-#else
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
-#endif
}
else if (rlGetVersion() == RL_OPENGL_43)
{