Commit graph raylib/src/rcore.c
Author SHA1 Message Date
moe li
4a53bad1cf
Merge 3778602d53 into 71643d8cda 2026-08-26 15:30:30 +04:00
luphi
1129d42b48
Mostly rewrote GetPrevDirectoryPath() to correct its behavior in a few cases (#6073) 2026-08-19 19:53:56 +02:00
Ray
a408dd332e REVIEWED: IsPathAbsolute(), remove isalpha() dependency 2026-07-24 21:17:11 +02:00
Colin James Wood
78535d2343
[rlsw] First batch of embedded optimizations and compiler requirements Pico 2 (#5994)
* pico doesn't implement time.h

* add option for RLSW to hold a back buffer, and give it a sw method to swap

* Remove unused pointer and give swSwapColorBuffers a default nop-behaviour

* Fix compilation by removing old colorBackBuffer setters

* use the correct logger

* return line

* rename RLSW_BACKBUFFER to SW_DOUBLE_BUFFERING
2026-07-21 18:20:58 +02:00
Ray
ce40053a6c Remove trailing spaces 2026-07-20 20:36:14 +02:00
Ray
6c6a248be8 Update rcore.c 2026-07-18 17:14:03 +02:00
Ray
58e03dbc6c REVIEWED: TakeScreenshot() to support absolute paths 2026-07-18 16:45:28 +02:00
Ray
cfccb83ddd ADDED: IsPathAbsolute() to check absolute paths 2026-07-18 16:44:41 +02:00
Ray
b806e3d2ec Replaced comments text given by provided 2026-07-18 16:44:10 +02:00
GideonSerf
7aceceb467
Fix logging format for automation event capacity warning (#5986)
Co-authored-by: gideons <gse@newspacesystems.com>
2026-07-17 20:31:26 +02:00
Ray
ab35e0f712 REVIEWED: LoadAutomationEventList() - ROS: CLN-005, CLN-006 2026-07-11 16:18:34 +02:00
Ray
f458296a07 small optimization 2026-07-11 12:21:24 +02:00
Ray
f8e42cb509 REVIEWED: OpenURL(), added some safety checks to mitigate possible malicious url inputs 2026-07-07 11:45:30 +02:00
Ray
d631a5a466 Merge branch 'master' of https://github.com/raysan5/raylib 2026-07-06 19:14:22 +02:00
Ray
5992929e56 REVIEWED: Security: strncpy() replaced by snprintf() 2026-07-06 19:13:44 +02:00
Timothy Fiss
3d640698d8
fix UB in ComputeSHA-1 (#5957) 2026-07-06 18:35:02 +02:00
Ray
0c0375f8ae ADDED: IsPathDirectory(), for convenience and more readability at user code 2026-07-02 10:49:31 +02:00
greymoth
67359073ca
[rcore] Add gamepad >= 0 lower-bound guard to six sibling functions (#5938)
Commit 3edfe194 added a `gamepad >= 0` lower-bound check to
GetGamepadAxisCount() and GetGamepadName(), but six sibling functions
were left with only the upper-bound check (`gamepad < MAX_GAMEPADS`).
A negative signed int passes that check and triggers out-of-bounds
access on CORE.Input.Gamepad.ready[gamepad] and related arrays (UB in C).

Apply the same `(gamepad >= 0) &&` guard added in 3edfe194 to:
- IsGamepadAvailable
- IsGamepadButtonPressed
- IsGamepadButtonDown
- IsGamepadButtonReleased
- IsGamepadButtonUp
- GetGamepadAxisMovement
2026-06-27 21:06:49 +02:00
Brandon Arrendondo
3edfe19438
[rcore] Bounds-check gamepad index in GetGamepadAxisCount() and GetGamepadName() (#5937)
* [rcore] Bounds-check gamepad index in GetGamepadAxisCount() and GetGamepadName()

Both public getters indexed CORE.Input.Gamepad.axisCount[gamepad] / .name[gamepad]
with an unvalidated gamepad argument -- an out-of-bounds read for gamepad < 0 or
gamepad >= MAX_GAMEPADS. Every sibling gamepad accessor (IsGamepadAvailable,
IsGamepadButton*, GetGamepadAxisMovement) already guards the index; add the same
check, returning a safe default (0 / NULL).

* Refactor GetGamepadName/GetGamepadAxisCount to single-return pattern

---------

Co-authored-by: Brandon Arrendondo <brandon.arrendondo@bissell.com>
2026-06-24 17:40:28 +02:00
Ray
f9c41a0866 Reemove trailing spaces 2026-06-16 21:12:12 +02:00
Ray
8713741782 Update rcore.c 2026-06-13 09:21:39 +02:00
InviseDivine
ac6526b731
[rcore] Fix `FileCopy` doesn't copy file when directory exists (#5920)
* Fix FileCopy result

* fix code style
2026-06-13 09:18:41 +02:00
Ray
a85c9f4898 REVIEWED: File*() functions for consistent return result value
NOTE: `SaveFile*()` still follows original convention, returning true on success...
2026-06-03 21:07:07 +02:00
Ray
2c690425c9 Reviewed comments, remove article usage 2026-06-03 21:02:59 +02:00
Alexandre Almeida
7c284cc5bc
Fix warning about unused variables (#5898) 2026-05-30 08:47:35 +02:00
moe li
3778602d53 exclude the 4kB buffer when Process API is not available 2026-05-27 02:51:31 +08:00
moe li
bf20b6761e remove unnecessary Process util functions 2026-05-26 13:03:59 +08:00
moe li
81712a891d rename Process internal opaque type to match naming coventions 2026-05-26 12:50:12 +08:00
moe li
b58608043d make invocation to ReadProcessOutput() on Windows non-blocking 2026-05-25 17:01:25 +08:00
moe li
05e35b81f6 return -1 when no exit code presents in WaitProcess() 2026-05-25 16:48:36 +08:00
moe li
c0b4c6ca58 unfreed process struct internal on Windows 2026-05-25 16:39:22 +08:00
moe li
f9667732d0 reading process stdout/stderr for POSIX-compliant platforms 2026-05-25 16:32:00 +08:00
moe li
4c898662e0 reading process stdout/stderr for Windows 2026-05-25 15:18:34 +08:00
moe li
c06402155e blocking wait function for process exit 2026-05-25 12:01:12 +08:00
moe li
c236b4eaaf refactor process manipulation API 2026-05-25 11:50:56 +08:00
Ray
5ca45bce37 Update rcore.c 2026-05-14 20:05:25 +02:00
Ray
e274c195af Update rcore.c 2026-05-13 09:15:50 +02:00
Ray
b2ea5eae5e REVIEWED: long long usage in all raylib, minimize
REVIEWED: Using `long long` format instead of `long long int`, more consistent with the `short` alternative for smaller `int`, instead of `short int`
2026-05-08 22:59:55 +02:00
Ray
61537200c0 Code cleaning 2026-05-07 15:18:42 +02:00
moe li
fc3cac5da3 add process suspending and resuming for Windows 2026-05-04 22:13:33 +08:00
moe li
c21e85ed90 remove unnecessary win32 util function 2026-04-29 23:16:43 +08:00
moe li
9b21238525 [rcore] process execution functions for windows 2026-04-29 21:42:35 +08:00
moe li
24b36efbdc [rcore] add process execution functions for posix systems 2026-04-29 19:28:48 +08:00
Huang Zhaobin
168e2c43d0
fix(rcore): correct string boundary handling (#5812)
Co-authored-by: Huang Zhaobin <xcpky@proton.me>
2026-04-29 00:18:33 +02:00
Ray
620b21bfce REVIEWED: Several functions const correctness 2026-04-27 11:36:32 +02:00
Ray
06621eb3b7 REVIEWED: Comments for consistency and spelling 2026-04-27 11:34:58 +02:00
Ray
6ae16c9895 REVIEWED: FileMove(), additional security checks 2026-04-27 10:23:28 +02:00
Luca Duran
dff07d020c
Fix FileMove from delete file if FileCopy did not work (#5806) 2026-04-26 20:15:33 +02:00
Ray
254953611e Update rcore.c 2026-04-24 13:58:52 +02:00
Itwerntme
9060ac7c95
Mouse delta calculation with scaling (#5779)
Added scaling from SetMouseScale to mouse GetMouseDelta
2026-04-19 13:50:15 +02:00