Commit Graph

169 Commits

Author SHA1 Message Date
Ray d3f5bc4043 REVIEWED: GetWindowHandle() #2950 2023-03-05 20:06:45 +01:00
Ray ab14ad5d75 Close issue #2949 2023-03-05 11:26:37 +01:00
Ray 1611cd54e7 REVIEWED: GetWindowHandle() #2938 2023-03-04 18:56:04 +01:00
Ray 7fd2bf1a32 Minimal tweak 2023-02-25 01:07:52 +01:00
Ray 215eb967e8 Update rcore.c 2023-02-24 18:31:16 +01:00
Ray b4d824d6fc REVIEWED: GetMonitorWidth() and GetMonitorHeight() #2934 2023-02-21 23:10:03 +01:00
Ray 8169d0eab2 REVIEWED: IsWindowFocused() to consider Android App state #2935 2023-02-21 23:01:23 +01:00
Ray bcae065c88 REVIEWED: IsShaderReady() 2023-02-21 13:15:11 +01:00
Ray 1347a15539 ADDED: SetWindowIcons() to set multiple icon image sizes 2023-02-21 13:14:51 +01:00
Ray beb44f1dac Avoid centering mouse when program launches 2023-02-15 13:11:26 +01:00
Ray 903d85e323 Make sure window position always inits in the middle of the current monitor 2023-02-15 12:53:41 +01:00
Ray 5dedb27ce0 REVIEWED: Issue with camera jump on first frame 2023-02-14 22:51:34 +01:00
Ray ea590c44a9 REVIEWED: Camera redesign PR 2023-02-14 20:00:51 +01:00
Julio C. Galindo 6ae21d6581 Fixed some grammar mistakes and typos. (#2914)
* Fixed some grammar mistakes.

* Fixed some typos.
2023-02-09 13:17:47 +01:00
Nikolas f784961b9c Enable GetWindowHandle() on macOS (#2915) 2023-02-07 22:18:14 +01:00
Ray 1fea266472 Clean trailing spaces 2023-02-05 16:30:23 +01:00
Ray 60d0ab418a some typos review 2023-02-05 11:44:12 +01:00
Rob Loach 83ff7b2466 ADDED: IsShaderReady(), IsImageReady(), IsFontReady(), IsWaveReady(), IsSoundReady(), IsMusicReady() (#2892)
These IsReady() functions provide a method in order to verify whether or not the object was loaded successfully. They're useful to make sure the assets are there prior to using them.
2023-01-27 19:24:03 +01:00
Rob Loach d8af76f67c Fix to use TRACELOG() instead of TraceLog() for internal modules (#2881)
There were a few raylib modules that continued to use TraceLog() instead of the TRACELOG() macro. This change ensures that all the internal raylib modules use the TRACELOG() pattern consistently.
2023-01-22 11:10:38 +01:00
Ray 78ae3b38a6 minor format tweak 2023-01-21 19:31:47 +01:00
Daijiro Fukuda c6376acfc4 Set initial window position for display-sized fullscreen (#2742) 2023-01-10 12:45:53 +01:00
Ray 6dd1d2d931 ADDED: Required define on Linux #2729 2023-01-10 12:20:45 +01:00
Ray ce8000ee7e REVIEWED: GetClipboardText() on PLATFORM_WEB 2023-01-04 20:13:44 +01:00
Ray 73234d2a28 Avoid trying to setup uniform for invalid locations 2023-01-03 17:44:06 +01:00
Ray 62f63f9e48 REVIEWED: Avoid possible gamepad index as -1 #2839
WARNING: It could require further review of `GamepadThread()` function where `js_event gamepadEvent.number` detecting current pressed button could generate a missmatch with index 0 (reserved for button unknow). Or maybe `0` could just be `GAMEPAD_BUTTON_NONE`? In that case, consistency with other inputs should be carefully considered...
2023-01-02 17:06:52 +01:00
Ray b59fab7ee6 Update year to 2023 2023-01-01 16:00:56 +01:00
Ray 03cc540d5f Minor tweak 2022-12-18 18:00:21 +01:00
Ray 72b9f3c5de Minor tweaks 2022-12-17 12:15:19 +01:00
Ray 2edf5a9584 REVIEWED: Issue with shader linkage 2022-11-29 10:45:10 +01:00
jtainer 50a716c0d9 Updated rcore.c, renamed 'time' to 'nanoSeconds' (#2816)
* Updated rcore.c, renamed 'time' to 'time_nsec'

When PLATFORM_ANDROID, PLATFORM_RPI or PLATFORM_DRM were defined, there is a compilation error to redefinition of the variable 'time', so the second instance of 'time' was changed to 'time_nsec' which both fixes the name collision and more accurately describes what that variable represents.

* Renamed 'time_nsec' to 'nanoSeconds'
2022-11-29 00:46:10 +01:00
Daijiro Fukuda 66a2cdee40 Fix array out of range (#2814)
This breaks other values of the struct.
2022-11-28 22:35:44 +01:00
Ray fc5894e734 REVIEWED: Some compilation warnings (for strict rules) 2022-11-28 14:16:59 +01:00
Ray c0010105c2 REVIEWED: UnloadDirectoryFiles() 2022-11-22 17:09:39 +01:00
Ray f6558fe6e0 Minor tweaks 2022-11-22 01:02:54 +01:00
Pere001 c8fd93d356 Warning on GetRandomValue range limit (#2800)
Added a comment explaining the range limitations of GetRandomValue.
Added a run-time warning TRACELOG when GetRandomValue is called with an invalid range.
2022-11-15 12:29:19 +01:00
Ray ca6f58eed1 Update rcore.c 2022-11-05 00:31:13 +01:00
Ray 28e8b2add3 REVIEWED: Issue with OpenURL() 2022-10-26 18:04:20 +02:00
Random 03f5fce672 removed glfwSetWindowPos on InitWindow (#2732)
* removed glfwSetWindowPos on InitWindow

* removed execute permission from CMakeLists
2022-10-02 10:46:33 +02:00
Random f14955512f fix issue #2728 (#2731)
* fix issue #2728

* updated gamecontrollerdb: fixes GLFW warning due to invalid entry
2022-09-30 10:09:49 +02:00
Ray 45da03df23 Reviewed monitor checking order 2022-09-29 12:00:20 +02:00
Ray 0ced04f0df Fix #2722 2022-09-29 11:08:00 +02:00
Ray 2ef0b064e5 Fix isssue #2718 2022-09-25 14:09:28 +02:00
Ray ea87491a82 ADDED: Support CAPS/NUM lock keys registering if locked 2022-09-25 00:14:59 +02:00
Ray 4b1d4b4f6b Update rcore.c 2022-09-22 20:30:02 +02:00
Ray 5530a3ceb8 REVIEWED: ScanDirectoryFilesRecursively(), fix #2704 2022-09-19 18:20:36 +02:00
Denis Pobedrya 27781a4767 Remove touch points on touch up events on Android (#2711)
Fixes #2683

Remove elements from touch point related arrays when touch up and
similar events are processed. This makes GetTouchPointCount() always
report the actual count of touch points, and all positions returned by
GetTouchPosition() correspond to positions of currently happening
touches.
2022-09-18 23:01:10 +02:00
Nikolas 42ecd72547 [rlgl] Check for extensions before enabling them (#2706)
* [rlgl] Check for extensions before enabling them

* Shift to glad on macOS

* #undef CORE_OPENGL_33

* Remove version hack and fix ASTC compression assumption

* Remove loader from glad

* Use GLAD_MALLOC/FREE instead of malloc/free

* More explicit extension checking
2022-09-18 21:08:51 +02:00
Denis Pobedrya 8f597b3cc3 Basic gamepad support for Android (#2709)
Currently assumes a single gamepad, has no code specific to gamepad
detection (gamepad is "detected" when an event related to gamepad
arrives). Also assumes that all gamepads look roughly like an xbox/ps
controller. Both assumptions are not strictly true, but an
implementation like that probably covers 85% of usecases.

Also it doesn't update previousButtonState so functions
IsGamepadButtonPressed() and IsGamepadButtonReleased() don't work, but
they didn't work previously on Android anyway, and they are flaky on
desktop as they are now, so the mechanism for these two functions
probably should be reworked anyway.

It's certainly an improvement compared to the previous android gamepad
handling code, which put gamepad events into touch related structs.
2022-09-18 19:58:52 +02:00
Denis Pobedrya ff25402f68 Fix viewport scaling bug on android after context rebind (#2703)
On android after rebinding context (which happens when you minimize and
navigate back to an app, or when you turn a screen off and back on)
there's a bug that viewport has a wrong scale and part of it is off
screen.

The change fixes it on devices I tried, but the solution feels hacky to
me. However when I attempted instead to call SetupViewport() again which
feels like a more proper solution, it didn't fix it.
2022-09-18 11:28:55 +02:00
Denis Pobedrya 8e57c8ace3 Fix touchscreen input related functions on Android (#2702)
Fix display -> screen coordinate conversion for android platform and
move it to the platform event handling code, simplifying
GetTouchPosition() function implementation.

Co-authored-by: Denis Pobedrya <denis.pobedrya@gmail.com>
2022-09-17 23:15:11 +02:00