REVIEWED: Issue with functions definitions

This commit is contained in:
Ray 2023-10-19 13:57:31 +02:00
parent b674e344a8
commit 081fffd46e
7 changed files with 17 additions and 13 deletions

View file

@ -516,7 +516,7 @@ void PollInputEvents(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more // Initialize platform: graphics, inputs and more
static int InitPlatform(void) int InitPlatform(void)
{ {
CORE.Window.currentFbo.width = CORE.Window.screen.width; CORE.Window.currentFbo.width = CORE.Window.screen.width;
CORE.Window.currentFbo.height = CORE.Window.screen.height; CORE.Window.currentFbo.height = CORE.Window.screen.height;
@ -589,7 +589,7 @@ static int InitPlatform(void)
} }
// Close platform // Close platform
static void ClosePlatform(void) void ClosePlatform(void)
{ {
// Close surface, context and display // Close surface, context and display
if (platform.device != EGL_NO_DISPLAY) if (platform.device != EGL_NO_DISPLAY)
@ -613,6 +613,7 @@ static void ClosePlatform(void)
} }
} }
// Initialize display device and framebuffer // Initialize display device and framebuffer
// NOTE: width and height represent the screen (framebuffer) desired size, not actual display size // 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 // If width or height are 0, default display size will be used for framebuffer size

View file

@ -1214,7 +1214,7 @@ void PollInputEvents(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more // Initialize platform: graphics, inputs and more
static int InitPlatform(void) int InitPlatform(void)
{ {
glfwSetErrorCallback(ErrorCallback); glfwSetErrorCallback(ErrorCallback);
/* /*
@ -1531,7 +1531,7 @@ static int InitPlatform(void)
} }
// Close platform // Close platform
static void ClosePlatform(void) void ClosePlatform(void)
{ {
glfwDestroyWindow(platform.handle); glfwDestroyWindow(platform.handle);
glfwTerminate(); glfwTerminate();

View file

@ -1070,7 +1070,7 @@ void PollInputEvents(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more // Initialize platform: graphics, inputs and more
static int InitPlatform(void) int InitPlatform(void)
{ {
// Initialize SDL internal global state // Initialize SDL internal global state
int result = SDL_Init(SDL_INIT_EVERYTHING); int result = SDL_Init(SDL_INIT_EVERYTHING);
@ -1180,7 +1180,7 @@ static int InitPlatform(void)
return 0; return 0;
} }
static void ClosePlatform(void) void ClosePlatform(void)
{ {
SDL_FreeCursor(platform.cursor); // Free cursor SDL_FreeCursor(platform.cursor); // Free cursor
SDL_GL_DeleteContext(platform.glContext); // Deinitialize OpenGL context SDL_GL_DeleteContext(platform.glContext); // Deinitialize OpenGL context
@ -1188,6 +1188,7 @@ static void ClosePlatform(void)
SDL_Quit(); // Deinitialize SDL internal global state SDL_Quit(); // Deinitialize SDL internal global state
} }
static KeyboardKey ConvertScancodeToKey(SDL_Scancode sdlScancode) static KeyboardKey ConvertScancodeToKey(SDL_Scancode sdlScancode)
{ {
if (sdlScancode >= 0 && sdlScancode < SCANCODE_MAPPED_NUM) if (sdlScancode >= 0 && sdlScancode < SCANCODE_MAPPED_NUM)

View file

@ -565,7 +565,7 @@ void PollInputEvents(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more // Initialize platform: graphics, inputs and more
static int InitPlatform(void) int InitPlatform(void)
{ {
platform.fd = -1; platform.fd = -1;
platform.connector = NULL; platform.connector = NULL;
@ -916,7 +916,7 @@ static int InitPlatform(void)
} }
// Close platform // Close platform
static void ClosePlatform(void) void ClosePlatform(void)
{ {
if (platform.prevFB) if (platform.prevFB)
{ {

View file

@ -429,7 +429,7 @@ void PollInputEvents(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more // Initialize platform: graphics, inputs and more
static int InitPlatform(void) int InitPlatform(void)
{ {
CORE.Window.fullscreen = true; CORE.Window.fullscreen = true;
CORE.Window.flags |= FLAG_FULLSCREEN_MODE; CORE.Window.flags |= FLAG_FULLSCREEN_MODE;
@ -556,7 +556,7 @@ static int InitPlatform(void)
} }
// Close platform // Close platform
static void ClosePlatform(void) void ClosePlatform(void)
{ {
// TODO: De-initialize graphics, inputs and more // TODO: De-initialize graphics, inputs and more
} }

View file

@ -669,7 +669,7 @@ void PollInputEvents(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Initialize platform: graphics, inputs and more // Initialize platform: graphics, inputs and more
static int InitPlatform(void) int InitPlatform(void)
{ {
glfwSetErrorCallback(ErrorCallback); glfwSetErrorCallback(ErrorCallback);
@ -932,12 +932,13 @@ static int InitPlatform(void)
} }
// Close platform // Close platform
static void ClosePlatform(void) void ClosePlatform(void)
{ {
glfwDestroyWindow(platform.handle); glfwDestroyWindow(platform.handle);
glfwTerminate(); glfwTerminate();
} }
// GLFW3 Error Callback, runs on GLFW3 error // GLFW3 Error Callback, runs on GLFW3 error
static void ErrorCallback(int error, const char *description) static void ErrorCallback(int error, const char *description)
{ {

View file

@ -2523,7 +2523,8 @@ int GetTouchPointCount(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// NOTE: Functions with a platform-specific implementation on rcore_<platform>.c // 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 // Initialize hi-resolution timer
void InitTimer(void) void InitTimer(void)