229f82699b
Reviewed change #5476
2026-01-07 22:36:40 +01:00
c256f146b4
added saving to memory buffer and SaveFileData for binary files ( #5476 )
2026-01-07 22:32:58 +01:00
af544c24b9
[rcore] Fix touch position automation event handling ( #5470 )
...
* fix touch position automation event handling
* Fix alignment of previousPosition comment in rcore.c
2026-01-03 22:57:22 +01:00
416af51a93
Update year to 2026
2026-01-02 13:40:15 +01:00
909f040dc5
Remove trailing spaces
2026-01-01 16:33:34 +01:00
0c3e10b262
REVIEWED: FileExists(), using macro
2025-12-30 22:49:43 +01:00
8cfb99f275
Minor comment tweaks
2025-12-28 16:08:19 +01:00
37bc3f5012
REMOVED: SetupFramebuffer(), most platforms do not need it any more
...
Kept only for platforms that could potentially need it
2025-12-28 16:07:59 +01:00
da1a76604f
REMOVED: CORE.Window.fullscreen, using available flag instead
2025-12-28 16:05:42 +01:00
101502103a
Fixed FLAG_IS_SET to check if all bits in the flag are set in the value ( #5441 )
2025-12-24 20:58:40 +01:00
4b760091da
REVIEWED: Window scaling with HighDPI on macOS #5059
2025-12-17 21:23:25 +01:00
6d562e5e87
REVIEWED: HiggDPI content scaling on changing monitors with different DPI #5335 #5356
...
Note that high-dpi awareness must be enabled by users and `CORE.Window.render` reports the scaled framebuffer size, while `CORE.Window.screen` reports the logical size.
`ToggleBorderlessWindow()` has also been reviewed to be consistent with scaling, if monitor physical display size is reported as 1920x1080 but there is a content scale of 1.5, then the borderless fullscreen window will be 1280x720, with the 1920x1080 framebuffer
2025-12-17 19:20:18 +01:00
9a337f3b3b
ADDED: Support software renderer on Web, blitting framebuffer data directly to a 2d canvas
...
This improvement is just a prove of concept, at this moment `PLATFORM_WEB` is limited in terms of software rendering by `GLFW` that only allows creating a WebGL canvas context with `glfwCreateWindow()`.
We can skip that call but then some GLFW functionality is not available (windowing, inputs). The best solution is replacing GLFW completely by a pure Emscripten implementation for `PLATFORM_WEB`.
2025-12-14 19:52:18 +01:00
c96669e123
REVIEWED: Webpage reference comments starting with REF:, more consistent with TODO: and NOTE: comments
2025-12-13 13:03:41 +01:00
b465b4e2ea
RENAMED: Variable names for consistency, textLength (length in bytes) vs textSize (measure in pixels)
2025-12-11 21:41:25 +01:00
2853b28d6d
REVIEWED: Avoid program crash if GPU data is tried to be loaded before InitWindow() #4751
...
Following raylib design, a warning log message is shown and program can continue execution.
Some early return checks have been added on most critical functions.
[rtext] Previous implementation checking `isGpuReady` cross-module variable is not needed any more, resulting in a more decoupled code, load failure is managed at rlgl level
2025-12-11 18:21:57 +01:00
2a566544d4
ADDED: Multiply security checks to avoid crashes on wrongly provided string data #4751
...
- REVIEWED: Checking `NULL` input on functions getting `const char *text`, to avoid crashes
- REVIEWED: `strcpy()` usage, prioritize `strncpy()` with limited copy to buffer size
- REPLACED: `strlen()` by `TextLength()` on [rtext] module
- REVIEWED: Replaced some early returns (but keeping others, for easier code following)
2025-12-11 12:59:55 +01:00
bc2057345b
REVIEWED: GetRandomValue(), explained the new approach to get more uniform random values range
2025-12-10 09:30:18 +01:00
f2a900a60d
[rcore] Fix modulo bias in GetRandomValue() ( #5392 )
...
* Fix modulo bias in GetRandomValue(); implement rejection sampling for uniformity
* Replace do-while with for-loop in GetRandomValue rejection sampling
2025-12-10 09:23:40 +01:00
91ac3cc707
FIX: LoadRandomSequence(), using GetRandomValue() #5393
2025-12-09 20:02:38 +01:00
be6007be93
fix: sha1 computation on messages longer than 31 bytes ( #5397 )
2025-12-09 19:18:43 +01:00
944567651c
replace sprintf with snprintf ( #5382 )
2025-12-02 22:49:55 +01:00
1bbc8682f4
Fixed some typos and mispellings ( #5381 )
...
Specifically "occured" -> "occurred"
2025-12-02 22:48:06 +01:00
8f3cabcf76
Update rcore.c
2025-11-25 19:13:08 +01:00
bd36610f91
Some formatting
2025-11-24 15:37:28 +01:00
7e3d6cbfa8
Update rcore.c
2025-11-23 23:16:32 +01:00
17dc2bb474
Update rcore.c
2025-11-23 22:58:15 +01:00
aaa893f668
Update rcore.c
2025-11-23 22:58:10 +01:00
e1b9857b14
Some TODOs and format reviews
2025-11-23 21:40:39 +01:00
fcaea5b1a1
Remove trailing spaces
2025-11-11 17:39:53 +01:00
4e8b087ffe
REVIEWED: ComputeSHA256()
2025-11-11 17:15:40 +01:00
0b4815b8fe
WARNING: REMOVED: GIT recording option, added example
2025-11-09 13:43:08 +01:00
5fbf67a630
[rcore] Use FLAG_* macros where possible ( #5169 )
...
* use FLAG_* macros where possible
* rename `FLAG_CHECK()` to `FLAG_IS_SET()`
* remove unnecessary equality checks
* fix issues
---------
Co-authored-by: Ray <raysan5@gmail.com >
2025-11-02 19:24:47 +01:00
0fbc4272d0
Remove trailing spaces
2025-10-26 18:22:23 +01:00
12dc0d6675
Revert undesired change to rcore and restore correct win32 ifdef and max path ( #5297 )
...
Fixes #5293
also add comment for win32 platform.
2025-10-23 17:45:33 +02:00
ec06f9be37
Removed trailing spaces
2025-10-21 13:51:03 +02:00
ec3cb7045f
Update rcore.c
2025-10-20 19:09:56 +02:00
adfe2c1704
C++ compiler support v2 ( #5252 )
...
* Get C++ compilers working
* Fix Formatting
2025-10-15 19:11:44 +02:00
17bc628fd9
[rcore] Add ComputeSHA256() function ( #5264 )
...
* [rcore] Add `ComputeSHA256()` function
* adjust function signatures
* review issues
* fix repeating 0
* fix mistake
* fixed macro
* remove undefs
* review styling mismatches
* rename `A0,1` to `SHA256_A0,1`
---------
Co-authored-by: CrackedPixel <5776225+CrackedPixel@users.noreply.github.com >
2025-10-15 19:07:41 +02:00
7191749d66
[examples] Fix examples to work in MSVC ( #5267 )
...
* Fix warnings in many examples
Add examples to MSVC solution correctly
* fix CI error
---------
Co-authored-by: Ray <raysan5@gmail.com >
2025-10-15 19:02:52 +02:00
aaf4c1d3ae
always forward declare the windows stuff, prevents failure of rgfw in GCC. ( #5269 )
2025-10-15 00:18:48 +02:00
2d7b66dd37
change free to RL_FREE ( #5265 )
2025-10-13 22:15:20 +02:00
02b3e44f88
swap TraceLog to TRACELOG ( #5226 )
2025-10-02 14:13:07 +02:00
c264c86ee0
ADDED: Some useful functions for Files and Text management
...
// File management functions
- int FileRename(const char *fileName, const char *fileRename); // Rename file (if exists)
- iint FileRemove(const char *fileName); // Remove file (if exists)
- iint FileCopy(const char *srcPath, const char *dstPath); // Copy file from one path to another, dstPath created if it doesn't exist
- iint FileMove(const char *srcPath, const char *dstPath); // Move file from one directory to another, dstPath created if it doesn't exist
- int FileTextReplace(const char *fileName, const char *search, const char *replacement); // Replace text in an existing file
- iint FileTextFindIndex(const char *fileName, const char *search); // Find text in existing file
// Text management functions
- const char *TextRemoveSpaces(const char *text); // Remove text spaces, concat words
- char *GetTextBetween(const char *text, const char *begin, const char *end); // Get text between two strings
- char *TextReplace(const char *text, const char *search, const char *replacement); // Replace text string (WARNING: memory must be freed!)
- char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings (WARNING: memory must be freed!)
2025-09-18 15:34:09 +02:00
ed8f1a22d1
Remove trailing spaces
2025-09-14 18:07:58 +02:00
5a54fc12a2
REVIEWED: Prioritize calloc() calls than malloc() on some cases
2025-09-10 21:03:06 +02:00
446f015ac5
Review formating
2025-09-05 23:10:13 +02:00
bd810368b0
Fixing base64 decoding error when input string is bad ( #5170 )
...
The following code would crash the previous version when calling MemFree:
// 53 * A
const char maliciousBase64Input[] = "AAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
int decodedSize = 0;
unsigned char *decodedData = DecodeDataBase64(
maliciousBase64Input, &decodedSize);
if (decodedData) {
MemFree(decodedData);
}
The reason is a lack of array bound checks in the decoding loop, which
corrupted here the heap (though this is platform dependent).
Adding the bound checks here prevents the memory corruption.
Tested with encoding random data of sizes 0-1023 and comparing it
with the decoded result.
2025-09-05 23:05:08 +02:00
ba046a5d60
REVIEWED: DecompressData(), fixed buffer copying
2025-09-04 10:44:20 +02:00
1777da9056
REVIEWED: Avoid realloc() calls, small security improvement
2025-09-01 20:37:23 +02:00