summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-10-19 13:57:31 +0200
committerRay <[email protected]>2023-10-19 13:57:31 +0200
commit081fffd46e56ae1e6f80b12bf8fe5728828def22 (patch)
treef70765fa3bd442155120827e00423603eb253ee3 /src
parentb674e344a878613881d5e8d0e9f86176e4c0a56f (diff)
downloadraylib-081fffd46e56ae1e6f80b12bf8fe5728828def22.tar.gz
raylib-081fffd46e56ae1e6f80b12bf8fe5728828def22.zip
REVIEWED: Issue with functions definitions
Diffstat (limited to 'src')
-rw-r--r--src/platforms/rcore_android.c5
-rw-r--r--src/platforms/rcore_desktop.c4
-rw-r--r--src/platforms/rcore_desktop_sdl.c5
-rw-r--r--src/platforms/rcore_drm.c4
-rw-r--r--src/platforms/rcore_template.c4
-rw-r--r--src/platforms/rcore_web.c5
-rw-r--r--src/rcore.c3
7 files changed, 17 insertions, 13 deletions
diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c
index ddf0c7a4..1272eecc 100644
--- a/src/platforms/rcore_android.c
+++ b/src/platforms/rcore_android.c
@@ -516,7 +516,7 @@ void PollInputEvents(void)
//----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more
-static int InitPlatform(void)
+int InitPlatform(void)
{
CORE.Window.currentFbo.width = CORE.Window.screen.width;
CORE.Window.currentFbo.height = CORE.Window.screen.height;
@@ -589,7 +589,7 @@ static int InitPlatform(void)
}
// Close platform
-static void ClosePlatform(void)
+void ClosePlatform(void)
{
// Close surface, context and display
if (platform.device != EGL_NO_DISPLAY)
@@ -613,6 +613,7 @@ static void ClosePlatform(void)
}
}
+
// Initialize display device and framebuffer
// NOTE: width and height represent the screen (framebuffer) desired size, not actual display size
// If width or height are 0, default display size will be used for framebuffer size
diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c
index 4dec2c77..ea1b15fa 100644
--- a/src/platforms/rcore_desktop.c
+++ b/src/platforms/rcore_desktop.c
@@ -1214,7 +1214,7 @@ void PollInputEvents(void)
//----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more
-static int InitPlatform(void)
+int InitPlatform(void)
{
glfwSetErrorCallback(ErrorCallback);
/*
@@ -1531,7 +1531,7 @@ static int InitPlatform(void)
}
// Close platform
-static void ClosePlatform(void)
+void ClosePlatform(void)
{
glfwDestroyWindow(platform.handle);
glfwTerminate();
diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c
index b6472433..c57a94fe 100644
--- a/src/platforms/rcore_desktop_sdl.c
+++ b/src/platforms/rcore_desktop_sdl.c
@@ -1070,7 +1070,7 @@ void PollInputEvents(void)
//----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more
-static int InitPlatform(void)
+int InitPlatform(void)
{
// Initialize SDL internal global state
int result = SDL_Init(SDL_INIT_EVERYTHING);
@@ -1180,7 +1180,7 @@ static int InitPlatform(void)
return 0;
}
-static void ClosePlatform(void)
+void ClosePlatform(void)
{
SDL_FreeCursor(platform.cursor); // Free cursor
SDL_GL_DeleteContext(platform.glContext); // Deinitialize OpenGL context
@@ -1188,6 +1188,7 @@ static void ClosePlatform(void)
SDL_Quit(); // Deinitialize SDL internal global state
}
+
static KeyboardKey ConvertScancodeToKey(SDL_Scancode sdlScancode)
{
if (sdlScancode >= 0 && sdlScancode < SCANCODE_MAPPED_NUM)
diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c
index 4df40e5b..2ecfc2a3 100644
--- a/src/platforms/rcore_drm.c
+++ b/src/platforms/rcore_drm.c
@@ -565,7 +565,7 @@ void PollInputEvents(void)
//----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more
-static int InitPlatform(void)
+int InitPlatform(void)
{
platform.fd = -1;
platform.connector = NULL;
@@ -916,7 +916,7 @@ static int InitPlatform(void)
}
// Close platform
-static void ClosePlatform(void)
+void ClosePlatform(void)
{
if (platform.prevFB)
{
diff --git a/src/platforms/rcore_template.c b/src/platforms/rcore_template.c
index 87aca16d..dc71a66c 100644
--- a/src/platforms/rcore_template.c
+++ b/src/platforms/rcore_template.c
@@ -429,7 +429,7 @@ void PollInputEvents(void)
//----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more
-static int InitPlatform(void)
+int InitPlatform(void)
{
CORE.Window.fullscreen = true;
CORE.Window.flags |= FLAG_FULLSCREEN_MODE;
@@ -556,7 +556,7 @@ static int InitPlatform(void)
}
// Close platform
-static void ClosePlatform(void)
+void ClosePlatform(void)
{
// TODO: De-initialize graphics, inputs and more
}
diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c
index bfc5bd79..e918e7d3 100644
--- a/src/platforms/rcore_web.c
+++ b/src/platforms/rcore_web.c
@@ -669,7 +669,7 @@ void PollInputEvents(void)
//----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more
-static int InitPlatform(void)
+int InitPlatform(void)
{
glfwSetErrorCallback(ErrorCallback);
@@ -932,12 +932,13 @@ static int InitPlatform(void)
}
// Close platform
-static void ClosePlatform(void)
+void ClosePlatform(void)
{
glfwDestroyWindow(platform.handle);
glfwTerminate();
}
+
// GLFW3 Error Callback, runs on GLFW3 error
static void ErrorCallback(int error, const char *description)
{
diff --git a/src/rcore.c b/src/rcore.c
index fd0335c6..e3cd0818 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -2523,7 +2523,8 @@ int GetTouchPointCount(void)
//----------------------------------------------------------------------------------
// NOTE: Functions with a platform-specific implementation on rcore_<platform>.c
-//static bool InitPlatform(void)
+//int InitPlatform(void)
+//void ClosePlatform(void)
// Initialize hi-resolution timer
void InitTimer(void)