Remove trailing spaces

This commit is contained in:
Ray 2026-07-20 20:36:14 +02:00
commit ce40053a6c
7 changed files with 21 additions and 21 deletions

View file

@ -1198,7 +1198,7 @@ void OpenURL(const char *url)
TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols");
} }
else else
{ {
char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char)); char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char));
#if defined(_WIN32) #if defined(_WIN32)
sprintf(cmd, "explorer \"%s\"", url); sprintf(cmd, "explorer \"%s\"", url);
@ -1211,7 +1211,7 @@ void OpenURL(const char *url)
#endif #endif
// TODO: Replace system() call by custom process // TODO: Replace system() call by custom process
int result = system(cmd); int result = system(cmd);
if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created"); if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created");
RL_FREE(cmd); RL_FREE(cmd);
} }
@ -2186,12 +2186,12 @@ static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffs
// GLFW3: Cursor ennter callback, when cursor enters the window // GLFW3: Cursor ennter callback, when cursor enters the window
static void CursorEnterCallback(GLFWwindow *window, int entered) static void CursorEnterCallback(GLFWwindow *window, int entered)
{ {
if (entered) if (entered)
{ {
// NOTE: Mouse position updated by MouseCursorPosCallback() // NOTE: Mouse position updated by MouseCursorPosCallback()
CORE.Input.Mouse.cursorOnScreen = true; CORE.Input.Mouse.cursorOnScreen = true;
} }
else else
{ {
CORE.Input.Mouse.cursorOnScreen = false; CORE.Input.Mouse.cursorOnScreen = false;
CORE.Input.Mouse.currentPosition = (Vector2){ 0 }; CORE.Input.Mouse.currentPosition = (Vector2){ 0 };

View file

@ -1488,7 +1488,7 @@ void OpenURL(const char *url)
TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols");
} }
else else
{ {
char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char)); char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char));
#if defined(_WIN32) #if defined(_WIN32)
sprintf(cmd, "explorer \"%s\"", url); sprintf(cmd, "explorer \"%s\"", url);
@ -1621,7 +1621,7 @@ void PollInputEvents(void)
while (mg_gamepads_check_event(&platform.minigamepad, &gamepad_event)) while (mg_gamepads_check_event(&platform.minigamepad, &gamepad_event))
{ {
int gamepadIndex = gamepad_event.gamepad->index; int gamepadIndex = gamepad_event.gamepad->index;
switch (gamepad_event.type) switch (gamepad_event.type)
{ {
case MG_EVENT_BUTTON_PRESS: case MG_EVENT_BUTTON_PRESS:
@ -1682,10 +1682,10 @@ void PollInputEvents(void)
if (platform.minigamepad.gamepads[gamepadIndex].axes[i].supported) axisCount += 1; if (platform.minigamepad.gamepads[gamepadIndex].axes[i].supported) axisCount += 1;
else break; else break;
} }
CORE.Input.Gamepad.axisCount[gamepadIndex] = axisCount; CORE.Input.Gamepad.axisCount[gamepadIndex] = axisCount;
snprintf(CORE.Input.Gamepad.name[gamepadIndex], MAX_GAMEPAD_NAME_LENGTH, "%s", platform.minigamepad.gamepads[gamepadIndex].name); snprintf(CORE.Input.Gamepad.name[gamepadIndex], MAX_GAMEPAD_NAME_LENGTH, "%s", platform.minigamepad.gamepads[gamepadIndex].name);
} break; } break;
case MG_EVENT_GAMEPAD_DISCONNECT: CORE.Input.Gamepad.ready[gamepadIndex] = false; break; case MG_EVENT_GAMEPAD_DISCONNECT: CORE.Input.Gamepad.ready[gamepadIndex] = false; break;
default: break; default: break;

View file

@ -1264,11 +1264,11 @@ void OpenURL(const char *url)
TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols"); TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols");
} }
else else
{ {
int len = strlen(url) + 16; int len = strlen(url) + 16;
char *cmd = (char *)RL_CALLOC(len, sizeof(char)); char *cmd = (char *)RL_CALLOC(len, sizeof(char));
snprintf(cmd, len, "explorer \"%s\"", url); snprintf(cmd, len, "explorer \"%s\"", url);
int result = system(cmd); int result = system(cmd);
if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created"); if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created");
RL_FREE(cmd); RL_FREE(cmd);
@ -1299,7 +1299,7 @@ void SetMousePosition(int x, int y)
if (!CORE.Input.Mouse.cursorLocked) if (!CORE.Input.Mouse.cursorLocked)
{ {
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y }; CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
TRACELOG(LOG_WARNING, "SetMousePosition not implemented at platform level"); TRACELOG(LOG_WARNING, "SetMousePosition not implemented at platform level");
} }
else TRACELOG(LOG_WARNING, "INPUT: MOUSE: Cursor not enabled"); else TRACELOG(LOG_WARNING, "INPUT: MOUSE: Cursor not enabled");

View file

@ -1444,7 +1444,7 @@ int InitPlatform(void)
return -1; return -1;
} }
// WARNING: Providing framebufferAttribs is not logically necessary, // WARNING: Providing framebufferAttribs is not logically necessary,
// but it may prevent segfaults on some nvidia drivers // but it may prevent segfaults on some nvidia drivers
if (!eglChooseConfig(platform.device, framebufferAttribs, NULL, 0, &numConfigs)) if (!eglChooseConfig(platform.device, framebufferAttribs, NULL, 0, &numConfigs))
{ {

View file

@ -2846,7 +2846,7 @@ bool IsPathDirectory(const char *path)
bool IsPathAbsolute(const char *path) bool IsPathAbsolute(const char *path)
{ {
int result = false; int result = false;
if ((path != NULL) && (path[0] != '\0')) if ((path != NULL) && (path[0] != '\0'))
{ {
#if defined(_WIN32) #if defined(_WIN32)

View file

@ -3793,7 +3793,7 @@ unsigned char *rlReadScreenPixels(int width, int height)
{ {
unsigned char *imgData = (unsigned char *)RL_CALLOC(width*height*4, sizeof(unsigned char)); unsigned char *imgData = (unsigned char *)RL_CALLOC(width*height*4, sizeof(unsigned char));
// NOTE: Buffer retrieved is GL_FRONT in single-buffered configurations // NOTE: Buffer retrieved is GL_FRONT in single-buffered configurations
// and GL_BACK in double-buffered configurations, make sure to call it at the end of frame // and GL_BACK in double-buffered configurations, make sure to call it at the end of frame
//glReadBuffer(GL_BACK); //glReadBuffer(GL_BACK);
@ -5243,7 +5243,7 @@ static int rlGetPixelDataSize(int width, int height, int format)
int blockHeight = (height + 3)/4; int blockHeight = (height + 3)/4;
unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*8; unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*8;
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
} break; } break;
case RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA: case RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA:
case RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA: case RL_PIXELFORMAT_COMPRESSED_DXT5_RGBA:
@ -5254,7 +5254,7 @@ static int rlGetPixelDataSize(int width, int height, int format)
int blockHeight = (height + 3)/4; int blockHeight = (height + 3)/4;
unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*16; unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*16;
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
} break; } break;
case RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: // 4 bytes per each 4x4 block case RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: // 4 bytes per each 4x4 block
{ {
@ -5262,7 +5262,7 @@ static int rlGetPixelDataSize(int width, int height, int format)
int blockHeight = (height + 3)/4; int blockHeight = (height + 3)/4;
unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*4; unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*4;
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
} break; } break;
default: break; default: break;
} }
@ -5274,7 +5274,7 @@ static int rlGetPixelDataSize(int width, int height, int format)
unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8) unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8)
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes; if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
} }
if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated"); if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated");
return dataSize; return dataSize;

View file

@ -1250,7 +1250,7 @@ Image ImageFromImage(Image image, Rectangle rec)
for (int y = 0; y < (int)rec.height; y++) for (int y = 0; y < (int)rec.height; y++)
{ {
memcpy(((unsigned char *)result.data) + y*(int)rec.width*bytesPerPixel, memcpy(((unsigned char *)result.data) + y*(int)rec.width*bytesPerPixel,
((unsigned char *)image.data) + ((y + (int)rec.y)*image.width + (int)rec.x)*bytesPerPixel, ((unsigned char *)image.data) + ((y + (int)rec.y)*image.width + (int)rec.x)*bytesPerPixel,
(int)rec.width*bytesPerPixel); (int)rec.width*bytesPerPixel);
} }
@ -5523,7 +5523,7 @@ int GetPixelDataSize(int width, int height, int format)
case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: bpp = 2; break; case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: bpp = 2; break;
default: break; default: break;
} }
unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8) unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8)
if (dataSizeBytes < INT_MAX) if (dataSizeBytes < INT_MAX)
@ -5538,7 +5538,7 @@ int GetPixelDataSize(int width, int height, int format)
else if ((format >= PIXELFORMAT_COMPRESSED_DXT3_RGBA) && (format < PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA)) dataSize = 16; else if ((format >= PIXELFORMAT_COMPRESSED_DXT3_RGBA) && (format < PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA)) dataSize = 16;
} }
} }
// NOTE: In case required image data larger than 2GB, no memory allocated at all (NULL) // NOTE: In case required image data larger than 2GB, no memory allocated at all (NULL)
if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated"); if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated");