Skip to content

Commit c318cd5

Browse files
committed
include raylib.h and rcore.c in platform files
this has already been done in `rcore_desktop_rgfw.c`, but not perfectly as the comments state, its there for LSPs
1 parent 070c789 commit c318cd5

7 files changed

Lines changed: 32 additions & 3 deletions

File tree

src/platforms/rcore_android.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
*
4747
**********************************************************************************************/
4848

49+
#ifndef RAYLIB_H // this should never actually happen, it's only here for IDEs
50+
#include "../raylib.h"
51+
#include "../rcore.c"
52+
#endif
53+
4954
#include <android_native_app_glue.h> // Required for: android_app struct and activity management
5055
#include <android/window.h> // Required for: AWINDOW_FLAG_FULLSCREEN definition and others
5156
//#include <android/sensor.h> // Required for: Android sensors functions (accelerometer, gyroscope, light...)

src/platforms/rcore_desktop_glfw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
*
5050
**********************************************************************************************/
5151

52+
#ifndef RAYLIB_H // this should never actually happen, it's only here for IDEs
53+
#include "../raylib.h"
54+
#include "../rcore.c"
55+
#endif
56+
5257
#define GLFW_INCLUDE_NONE // Disable the standard OpenGL header inclusion on GLFW3
5358
// NOTE: Already provided by rlgl implementation (on glad.h)
5459
#include "GLFW/glfw3.h" // GLFW3 library: Windows, OpenGL context and Input management

src/platforms/rcore_desktop_rgfw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
*
4949
**********************************************************************************************/
5050

51-
#ifndef RAYLIB_H /* this should never actually happen, it's only here for IDEs */
52-
#include "raylib.h"
53-
#include "../rcore.c"
51+
#ifndef RAYLIB_H // this should never actually happen, it's only here for IDEs
52+
#include "../raylib.h"
53+
#include "../rcore.c"
5454
#endif
5555

5656
#if defined(PLATFORM_WEB_RGFW)

src/platforms/rcore_desktop_sdl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
*
4949
**********************************************************************************************/
5050

51+
#ifndef RAYLIB_H // this should never actually happen, it's only here for IDEs
52+
#include "../raylib.h"
53+
#include "../rcore.c"
54+
#endif
55+
5156
#ifdef USING_SDL3_PACKAGE
5257
#define USING_SDL3_PROJECT
5358
#endif

src/platforms/rcore_drm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
*
4949
**********************************************************************************************/
5050

51+
#ifndef RAYLIB_H // this should never actually happen, it's only here for IDEs
52+
#include "../raylib.h"
53+
#include "../rcore.c"
54+
#endif
55+
5156
#include <fcntl.h> // POSIX file control definitions - open(), creat(), fcntl()
5257
#include <unistd.h> // POSIX standard function definitions - read(), close(), STDIN_FILENO
5358
#include <termios.h> // POSIX terminal control definitions - tcgetattr(), tcsetattr()

src/platforms/rcore_template.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
**********************************************************************************************/
4848

4949
// TODO: Include the platform specific libraries
50+
#ifndef RAYLIB_H // this should never actually happen, it's only here for IDEs
51+
#include "../raylib.h"
52+
#include "../rcore.c"
53+
#endif
5054

5155
//----------------------------------------------------------------------------------
5256
// Types and Structures Definition

src/platforms/rcore_web.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
*
4646
**********************************************************************************************/
4747

48+
#ifndef RAYLIB_H // this should never actually happen, it's only here for IDEs
49+
#include "../raylib.h"
50+
#include "../rcore.c"
51+
#endif
52+
4853
#define GLFW_INCLUDE_NONE // Disable the standard OpenGL header inclusion on GLFW3
4954
// NOTE: Already provided by rlgl implementation (on glad.h)
5055
#include "GLFW/glfw3.h" // GLFW3: Windows, OpenGL context and Input management

0 commit comments

Comments
 (0)