Remove trailing spaces

This commit is contained in:
Ray
2026-03-13 18:50:26 +01:00
parent 7b9a2a4145
commit 6ba6df3af3
9 changed files with 43 additions and 43 deletions

View File

@ -280,15 +280,15 @@ static int android_close(void *cookie);
// The flag MUST be applied at every final link step that needs wrapping,
// it has no effect when only building a static archive (.a)
//
// CMake: no action required, raylib's CMakeLists.txt already sets
// CMake: no action required, raylib's CMakeLists.txt already sets
// target_link_options(raylib INTERFACE -Wl,--wrap=fopen) which propagates to
// the final app link, wrapping app code and all static (.a) dependencies too
// Make (SHARED): no action required for raylib itself, src/Makefile already sets
// Make (SHARED): no action required for raylib itself, src/Makefile already sets
// LDFLAGS += -Wl,--wrap=fopen wrapping fopen inside libraylib.so only;
// app code and static (.a) dependencies are NOT wrapped unless -Wl,--wrap=fopen
// is also added to the final app link step
// Make (STATIC): pass -Wl,--wrap=fopen to the linker command producing the final artifact
// build.zig: no dedicated wrap helper; pass -Wl,--wrap=fopen to the linker command producing
// build.zig: no dedicated wrap helper; pass -Wl,--wrap=fopen to the linker command producing
// the final artifact
// custom: pass -Wl,--wrap=fopen to the linker command producing the final artifact
FILE *__real_fopen(const char *fileName, const char *mode); // Real fopen, provided by the linker (--wrap=fopen)

View File

@ -819,22 +819,22 @@ EM_ASYNC_JS(void, RequestClipboardData, (void), {
{
const blob = await item.getType(item.types.find(t => t.startsWith("image/")));
const bitmap = await createImageBitmap(blob);
const canvas = document.createElement('canvas');
canvas.width = bitmap.width;
canvas.height = bitmap.height;
const ctx = canvas.getContext('2d');
ctx.drawImage(bitmap, 0, 0);
const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height).data;
// Store image and data for the Fetch function
window._lastImgWidth = canvas.width;
window._lastImgHeight = canvas.height;
window._lastImgData = imgData;
window._lastImgData = imgData;
}
}
}
}
else console.warn("Clipboard read() requires HTTPS/Localhost");
});
@ -856,19 +856,19 @@ EM_JS(unsigned char *, GetLastPastedImage, (int *width, int *height), {
if (window._lastImgData)
{
const data = window._lastImgData;
if (data.length > 0)
if (data.length > 0)
{
const ptr = _malloc(data.length);
HEAPU8.set(data, ptr);
// Set the width and height via the pointers passed from C
// HEAP32 handles the 4-byte integers
if (width) setValue(width, window._lastImgWidth, 'i32');
if (height) setValue(height, window._lastImgHeight, 'i32');
// Clear the JS buffer so there is no need to fetch the same image twice
window._lastImgData = null;
window._lastImgData = null;
return ptr;
}
}
@ -898,7 +898,7 @@ Image GetClipboardImage(void)
image.mipmaps = 1;
image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
}
return image;
}

View File

@ -797,22 +797,22 @@ EM_ASYNC_JS(void, RequestClipboardData, (void), {
{
const blob = await item.getType(item.types.find(t => t.startsWith("image/")));
const bitmap = await createImageBitmap(blob);
const canvas = document.createElement('canvas');
canvas.width = bitmap.width;
canvas.height = bitmap.height;
const ctx = canvas.getContext('2d');
ctx.drawImage(bitmap, 0, 0);
const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height).data;
// Store image and data for the Fetch function
window._lastImgWidth = canvas.width;
window._lastImgHeight = canvas.height;
window._lastImgData = imgData;
window._lastImgData = imgData;
}
}
}
}
else console.warn("Clipboard read() requires HTTPS/Localhost");
});
@ -838,15 +838,15 @@ EM_JS(unsigned char *, GetLastPastedImage, (int *width, int *height), {
{
const ptr = _malloc(data.length);
HEAPU8.set(data, ptr);
// Set the width and height via the pointers passed from C
// HEAP32 handles the 4-byte integers
if (width) setValue(width, window._lastImgWidth, 'i32');
if (height) setValue(height, window._lastImgHeight, 'i32');
// Clear the JS buffer so there is no need to fetch the same image twice
window._lastImgData = null;
window._lastImgData = null;
return ptr;
}
}
@ -876,7 +876,7 @@ Image GetClipboardImage(void)
image.mipmaps = 1;
image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
}
return image;
}