Skip to content

Commit

Permalink
Remove rcore.h include from SDL
Browse files Browse the repository at this point in the history
  • Loading branch information
ubkp committed Oct 28, 2023
1 parent b46505b commit cfb3b38
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/platforms/rcore_desktop_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
*
**********************************************************************************************/

#include "rcore.h"

#include "SDL.h" // SDL base library (window/rendered, input, timming... functionality)
#include "SDL_opengl.h" // SDL OpenGL functionality (if required, instead of internal renderer)

Expand Down Expand Up @@ -998,7 +996,7 @@ void PollInputEvents(void)
switch (event.type)
{
case SDL_QUIT: CORE.Window.shouldClose = true; break;

case SDL_DROPFILE: // Dropped file
{
if (CORE.Window.dropFileCount == 0)
Expand All @@ -1019,7 +1017,7 @@ void PollInputEvents(void)
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], event.drop.file);
SDL_free(event.drop.file);

CORE.Window.dropFileCount++;
}
else TRACELOG(LOG_WARNING, "FILE: Maximum drag and drop files at once is limited to 1024 files!");
Expand Down Expand Up @@ -1274,7 +1272,7 @@ int InitPlatform(void)
SDL_Joystick *gamepad = SDL_JoystickOpen(0);
//if (SDL_Joystick *gamepad == NULL) SDL_Log("WARNING: Unable to open game controller! SDL Error: %s\n", SDL_GetError());
}

SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
//----------------------------------------------------------------------------

Expand Down

0 comments on commit cfb3b38

Please sign in to comment.