Ray
229f82699b
Reviewed change #5476
3 veckor sedan
ssszcmawo
c256f146b4
added saving to memory buffer and SaveFileData for binary files ( #5476 )
3 veckor sedan
ssszcmawo
af544c24b9
[rcore] Fix touch position automation event handling ( #5470 )
* fix touch position automation event handling
* Fix alignment of previousPosition comment in rcore.c
4 veckor sedan
Ray
416af51a93
Update year to 2026
1 månad sedan
Ray
909f040dc5
Remove trailing spaces
1 månad sedan
Ray
0c3e10b262
REVIEWED: `FileExists()`, using macro
1 månad sedan
Ray
8cfb99f275
Minor comment tweaks
1 månad sedan
Ray
37bc3f5012
REMOVED: `SetupFramebuffer()`, most platforms do not need it any more
Kept only for platforms that could potentially need it
1 månad sedan
Ray
da1a76604f
REMOVED: `CORE.Window.fullscreen`, using available flag instead
1 månad sedan
Dan Vu
101502103a
Fixed FLAG_IS_SET to check if all bits in the flag are set in the value ( #5441 )
1 månad sedan
Ray
4b760091da
REVIEWED: Window scaling with HighDPI on macOS #5059
1 månad sedan
Ray
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
1 månad sedan
Ray
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`.
1 månad sedan
Ray
c96669e123
REVIEWED: Webpage reference comments starting with `REF:`, more consistent with `TODO:` and `NOTE:` comments
1 månad sedan
Ray
b465b4e2ea
RENAMED: Variable names for consistency, `textLength` (length in bytes) vs `textSize` (measure in pixels)
1 månad sedan
Ray
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
1 månad sedan
Ray
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)
1 månad sedan
Ray
bc2057345b
REVIEWED: `GetRandomValue()`, explained the new approach to get more uniform random values range
1 månad sedan
Marcos De La Torre
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
1 månad sedan
Ray
91ac3cc707
FIX: `LoadRandomSequence()`, using `GetRandomValue()` #5393
1 månad sedan
Gregory Mitchell
be6007be93
fix: sha1 computation on messages longer than 31 bytes ( #5397 )
1 månad sedan
Connor O'Connor
944567651c
replace sprintf with snprintf ( #5382 )
2 månader sedan
Connor O'Connor
1bbc8682f4
Fixed some typos and mispellings ( #5381 )
Specifically "occured" -> "occurred"
2 månader sedan
Ray
8f3cabcf76
Update rcore.c
2 månader sedan
Ray
bd36610f91
Some formatting
2 månader sedan
Ray
7e3d6cbfa8
Update rcore.c
2 månader sedan
Ray
17dc2bb474
Update rcore.c
2 månader sedan
Ray
aaa893f668
Update rcore.c
2 månader sedan
Ray
e1b9857b14
Some TODOs and format reviews
2 månader sedan
Ray
fcaea5b1a1
Remove trailing spaces
2 månader sedan
Ray
4e8b087ffe
REVIEWED: `ComputeSHA256()`
2 månader sedan
Ray
0b4815b8fe
WARNING: REMOVED: GIT recording option, added example
2 månader sedan
JohnnyCena123
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>
3 månader sedan
Ray
0fbc4272d0
Remove trailing spaces
3 månader sedan
Jeffery Myers
12dc0d6675
Revert undesired change to rcore and restore correct win32 ifdef and max path ( #5297 )
Fixes #5293
also add comment for win32 platform.
3 månader sedan
Ray
ec06f9be37
Removed trailing spaces
3 månader sedan
Ray
ec3cb7045f
Update rcore.c
3 månader sedan
Saksham Goyal
adfe2c1704
C++ compiler support v2 ( #5252 )
* Get C++ compilers working
* Fix Formatting
3 månader sedan
JohnnyCena123
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>
3 månader sedan
Jeffery Myers
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>
3 månader sedan
Jeffery Myers
aaf4c1d3ae
always forward declare the windows stuff, prevents failure of rgfw in GCC. ( #5269 )
3 månader sedan
Thomas Anderson
2d7b66dd37
change free to RL_FREE ( #5265 )
3 månader sedan
JohnnyCena123
02b3e44f88
swap TraceLog to TRACELOG ( #5226 )
4 månader sedan
Ray
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!)
4 månader sedan
Ray
ed8f1a22d1
Remove trailing spaces
4 månader sedan
Ray
5a54fc12a2
REVIEWED: Prioritize `calloc()` calls than `malloc()` on some cases
4 månader sedan
Ray
446f015ac5
Review formating
4 månader sedan
Eike Decker
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.
4 månader sedan
Ray
ba046a5d60
REVIEWED: `DecompressData()`, fixed buffer copying
5 månader sedan
Ray
1777da9056
REVIEWED: Avoid realloc() calls, small security improvement
5 månader sedan