Commit d798280 1 parent deaffb0 commit d798280 Copy full SHA for d798280
File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -1275,8 +1275,9 @@ void PollInputEvents(void)
1275
1275
// Initialize platform: graphics, inputs and more
1276
1276
int InitPlatform (void )
1277
1277
{
1278
- // Initialize SDL internal global state
1279
- int result = SDL_Init (SDL_INIT_EVERYTHING );
1278
+ // Initialize SDL internal global state, only required systems
1279
+ // NOTE: Not all systems need to be initialized, SDL_INIT_AUDIO is not required, managed by miniaudio
1280
+ int result = SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_EVENTS | SDL_INIT_GAMECONTROLLER );
1280
1281
if (result < 0 ) { TRACELOG (LOG_WARNING , "SDL: Failed to initialize SDL" ); return -1 ; }
1281
1282
1282
1283
// Initialize graphic device: display/window and graphic context
@@ -1328,11 +1329,7 @@ int InitPlatform(void)
1328
1329
{
1329
1330
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION , 3 );
1330
1331
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION , 3 );
1331
- #if defined(__APPLE__ )
1332
- SDL_GL_SetAttribute (SDL_GL_CONTEXT_FLAGS , SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG ); // OSX Requires forward compatibility
1333
- #else
1334
1332
SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK , SDL_GL_CONTEXT_PROFILE_CORE );
1335
- #endif
1336
1333
}
1337
1334
else if (rlGetVersion () == RL_OPENGL_43 )
1338
1335
{
You can’t perform that action at this time.
0 commit comments