mirror of
https://github.com/raysan5/raylib.git
synced 2026-07-31 04:38:54 +00:00
Remove trailing spaces
This commit is contained in:
@@ -1198,7 +1198,7 @@ void OpenURL(const char *url)
|
||||
TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols");
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char));
|
||||
#if defined(_WIN32)
|
||||
sprintf(cmd, "explorer \"%s\"", url);
|
||||
@@ -1211,7 +1211,7 @@ void OpenURL(const char *url)
|
||||
#endif
|
||||
// TODO: Replace system() call by custom process
|
||||
int result = system(cmd);
|
||||
|
||||
|
||||
if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created");
|
||||
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
|
||||
static void CursorEnterCallback(GLFWwindow *window, int entered)
|
||||
{
|
||||
if (entered)
|
||||
if (entered)
|
||||
{
|
||||
// NOTE: Mouse position updated by MouseCursorPosCallback()
|
||||
CORE.Input.Mouse.cursorOnScreen = true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
CORE.Input.Mouse.cursorOnScreen = false;
|
||||
CORE.Input.Mouse.currentPosition = (Vector2){ 0 };
|
||||
|
||||
@@ -1488,7 +1488,7 @@ void OpenURL(const char *url)
|
||||
TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols");
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
char *cmd = (char *)RL_CALLOC(strlen(url) + 16, sizeof(char));
|
||||
#if defined(_WIN32)
|
||||
sprintf(cmd, "explorer \"%s\"", url);
|
||||
@@ -1621,7 +1621,7 @@ void PollInputEvents(void)
|
||||
while (mg_gamepads_check_event(&platform.minigamepad, &gamepad_event))
|
||||
{
|
||||
int gamepadIndex = gamepad_event.gamepad->index;
|
||||
|
||||
|
||||
switch (gamepad_event.type)
|
||||
{
|
||||
case MG_EVENT_BUTTON_PRESS:
|
||||
@@ -1682,10 +1682,10 @@ void PollInputEvents(void)
|
||||
if (platform.minigamepad.gamepads[gamepadIndex].axes[i].supported) axisCount += 1;
|
||||
else break;
|
||||
}
|
||||
|
||||
|
||||
CORE.Input.Gamepad.axisCount[gamepadIndex] = axisCount;
|
||||
snprintf(CORE.Input.Gamepad.name[gamepadIndex], MAX_GAMEPAD_NAME_LENGTH, "%s", platform.minigamepad.gamepads[gamepadIndex].name);
|
||||
|
||||
|
||||
} break;
|
||||
case MG_EVENT_GAMEPAD_DISCONNECT: CORE.Input.Gamepad.ready[gamepadIndex] = false; break;
|
||||
default: break;
|
||||
|
||||
@@ -1264,11 +1264,11 @@ void OpenURL(const char *url)
|
||||
TRACELOG(LOG_WARNING, "SYSTEM: Provided URL must start with 'http://' or 'https://' protocols");
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
int len = strlen(url) + 16;
|
||||
char *cmd = (char *)RL_CALLOC(len, sizeof(char));
|
||||
snprintf(cmd, len, "explorer \"%s\"", url);
|
||||
|
||||
|
||||
int result = system(cmd);
|
||||
if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created");
|
||||
RL_FREE(cmd);
|
||||
@@ -1299,7 +1299,7 @@ void SetMousePosition(int x, int y)
|
||||
if (!CORE.Input.Mouse.cursorLocked)
|
||||
{
|
||||
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
|
||||
|
||||
|
||||
TRACELOG(LOG_WARNING, "SetMousePosition not implemented at platform level");
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "INPUT: MOUSE: Cursor not enabled");
|
||||
|
||||
@@ -1444,7 +1444,7 @@ int InitPlatform(void)
|
||||
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
|
||||
if (!eglChooseConfig(platform.device, framebufferAttribs, NULL, 0, &numConfigs))
|
||||
{
|
||||
|
||||
@@ -2846,7 +2846,7 @@ bool IsPathDirectory(const char *path)
|
||||
bool IsPathAbsolute(const char *path)
|
||||
{
|
||||
int result = false;
|
||||
|
||||
|
||||
if ((path != NULL) && (path[0] != '\0'))
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
|
||||
10
src/rlgl.h
10
src/rlgl.h
@@ -3793,7 +3793,7 @@ unsigned char *rlReadScreenPixels(int width, int height)
|
||||
{
|
||||
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
|
||||
//glReadBuffer(GL_BACK);
|
||||
|
||||
@@ -5243,7 +5243,7 @@ static int rlGetPixelDataSize(int width, int height, int format)
|
||||
int blockHeight = (height + 3)/4;
|
||||
unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*8;
|
||||
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
|
||||
|
||||
|
||||
} break;
|
||||
case RL_PIXELFORMAT_COMPRESSED_DXT3_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;
|
||||
unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*16;
|
||||
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
|
||||
|
||||
|
||||
} break;
|
||||
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;
|
||||
unsigned long long dataSizeBytes = (unsigned long long)blockWidth*blockHeight*4;
|
||||
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
|
||||
|
||||
|
||||
} 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)
|
||||
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");
|
||||
|
||||
return dataSize;
|
||||
|
||||
@@ -1250,7 +1250,7 @@ Image ImageFromImage(Image image, Rectangle rec)
|
||||
|
||||
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,
|
||||
(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;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
||||
unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8)
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user