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