Commit Graph

444 Commits

Author SHA1 Message Date
Ray 65cddc852e Reviewed comments 2026-01-25 19:06:08 +01:00
Catania 594f5429b2 [rcore] LoadDirectoryFilesEx(), count files if not recursive (#5496)
* LoadDirectoryFilesEx on not recursive loading count files

* Removed FilePathList.capacity

* Added security check in case of memory leak

* Fix stop loading paths early on recursive loading

* Fix count directories only if filter contains DIRECTORY_FILTER_TAG

* rlparser: update raylib_api.* by CI

* GetDirectoryFileCount() and GetDirectoryFileCountEx() made visible

* rlparser: update raylib_api.* by CI

* Added new file and directories filter tags

* Renamed `fileCount` in `ScanDirectoryFiles()` to `expectedFileCount`

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-23 13:48:26 +01:00
Ray 29896a2403 REVIEWED: Some comments (Code Gardening) 2026-01-19 12:40:32 +01:00
Ray 439448ad7c Update rcore.c 2026-01-15 10:43:08 +01:00
base a938a7c97a chore: add GetAppDir for wasm returning root VFS (#5495) 2026-01-15 10:08:03 +01:00
Ray 0c33c603f4 REVIEWED: EXTERNAL_CONFIG_FLAGS usage, check moved to config.h
Due to `utils` module removal, `EXTERNAL_CONFIG_FLAGS` was not working, so the system was redesigned.
This change is independent of #4411
2026-01-12 13:04:38 +01:00
Ray dd7a1948f1 WARNING: REDESIGN: REMOVED: utils module, functionality moved to rcore module: logging and file-system #4551
[utils] was created long time ago, when [rcore] contained all the platforms code, the purpose of the file was exposing basic filesystem functionality across modules and also logging mechanism but many things have changed since then and there is no need to keep using this module.

 - Logging system has been move to [rcore] module and macros are exposed through `config.h` to other modules
 - File system functionality has also been centralized in [rcore] module that along the years it was already adding more and more file-system functions, now they are all in the same module
 - Android specific code has been moved to `rcore_android.c`, it had no sense to have specific platform code in `utils`, [rcore] is responsible of all platform code.
2026-01-10 12:13:07 +01:00
Ray 229f82699b Reviewed change #5476 2026-01-07 22:36:40 +01:00
ssszcmawo c256f146b4 added saving to memory buffer and SaveFileData for binary files (#5476) 2026-01-07 22:32:58 +01:00
ssszcmawo 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
Ray 416af51a93 Update year to 2026 2026-01-02 13:40:15 +01:00
Ray 909f040dc5 Remove trailing spaces 2026-01-01 16:33:34 +01:00
Ray 0c3e10b262 REVIEWED: FileExists(), using macro 2025-12-30 22:49:43 +01:00
Ray 8cfb99f275 Minor comment tweaks 2025-12-28 16:08:19 +01:00
Ray 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
Ray da1a76604f REMOVED: CORE.Window.fullscreen, using available flag instead 2025-12-28 16:05:42 +01:00
Dan Vu 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
Ray 4b760091da REVIEWED: Window scaling with HighDPI on macOS #5059 2025-12-17 21:23:25 +01:00
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
2025-12-17 19:20:18 +01:00
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`.
2025-12-14 19:52:18 +01:00
Ray c96669e123 REVIEWED: Webpage reference comments starting with REF:, more consistent with TODO: and NOTE: comments 2025-12-13 13:03:41 +01:00
Ray b465b4e2ea RENAMED: Variable names for consistency, textLength (length in bytes) vs textSize (measure in pixels) 2025-12-11 21:41:25 +01:00
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
2025-12-11 18:21:57 +01:00
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)
2025-12-11 12:59:55 +01:00
Ray bc2057345b REVIEWED: GetRandomValue(), explained the new approach to get more uniform random values range 2025-12-10 09:30:18 +01:00
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
2025-12-10 09:23:40 +01:00
Ray 91ac3cc707 FIX: LoadRandomSequence(), using GetRandomValue() #5393 2025-12-09 20:02:38 +01:00
Gregory Mitchell be6007be93 fix: sha1 computation on messages longer than 31 bytes (#5397) 2025-12-09 19:18:43 +01:00
Connor O'Connor 944567651c replace sprintf with snprintf (#5382) 2025-12-02 22:49:55 +01:00
Connor O'Connor 1bbc8682f4 Fixed some typos and mispellings (#5381)
Specifically "occured" -> "occurred"
2025-12-02 22:48:06 +01:00
Ray 8f3cabcf76 Update rcore.c 2025-11-25 19:13:08 +01:00
Ray bd36610f91 Some formatting 2025-11-24 15:37:28 +01:00
Ray 7e3d6cbfa8 Update rcore.c 2025-11-23 23:16:32 +01:00
Ray 17dc2bb474 Update rcore.c 2025-11-23 22:58:15 +01:00
Ray aaa893f668 Update rcore.c 2025-11-23 22:58:10 +01:00
Ray e1b9857b14 Some TODOs and format reviews 2025-11-23 21:40:39 +01:00
Ray fcaea5b1a1 Remove trailing spaces 2025-11-11 17:39:53 +01:00
Ray 4e8b087ffe REVIEWED: ComputeSHA256() 2025-11-11 17:15:40 +01:00
Ray 0b4815b8fe WARNING: REMOVED: GIT recording option, added example 2025-11-09 13:43:08 +01:00
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>
2025-11-02 19:24:47 +01:00
Ray 0fbc4272d0 Remove trailing spaces 2025-10-26 18:22:23 +01:00
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.
2025-10-23 17:45:33 +02:00
Ray ec06f9be37 Removed trailing spaces 2025-10-21 13:51:03 +02:00
Ray ec3cb7045f Update rcore.c 2025-10-20 19:09:56 +02:00
Saksham Goyal adfe2c1704 C++ compiler support v2 (#5252)
* Get C++ compilers working

* Fix Formatting
2025-10-15 19:11:44 +02:00
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>
2025-10-15 19:07:41 +02:00
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>
2025-10-15 19:02:52 +02:00
Jeffery Myers aaf4c1d3ae always forward declare the windows stuff, prevents failure of rgfw in GCC. (#5269) 2025-10-15 00:18:48 +02:00
Thomas Anderson 2d7b66dd37 change free to RL_FREE (#5265) 2025-10-13 22:15:20 +02:00
JohnnyCena123 02b3e44f88 swap TraceLog to TRACELOG (#5226) 2025-10-02 14:13:07 +02:00