summaryrefslogtreecommitdiffhomepage
path: root/src/platforms
AgeCommit message (Collapse)Author
2024-04-21Review formattingRay
2024-04-19Fix window not initializing on primary monitor on GLFW backend (#3923)Rafael Bordoni
The way the current code worked was by calling `GetCurrentMonitor()`, which would always return the monitor at position (0,0). This isn't the primary monitor on all platforms, on Linux in particular it isn't the case. This isn't the case on the SDL backend, after calling `InitWindow()` the window would always show up on the primary monitor. Even on the GLFW backend, if the full screen flag was set it would attempt to put it on the primary monitor as it would call `glfwGetPrimaryMonitor()` to do it, so for consistency's sake we should do it on windowed mode too.
2024-04-15Fix GetKeyPressed for PLATFORM_DESKTOP_SDL (#3869)Arthur
The key handling in PLATFORM_DESKTOP_SDL was faulty in two ways, which led to GetKeyPressed returning incorrect data. CORE.Input.Keyboard.keyPressedQueue was updated only on SDL_TEXTINPUT, meaning only text characters were registered as a pressed key, but not function keys (eg. tab, backspace...). Also on such event, both CORE.Input.Keyboard.keyPressedQueue and CORE.Input.Keyboard.charPressedQueue were assigned the key's corresponding codepoint, when CORE.Input.Keyboard.keyPressedQueue should get the raylib keycode instead. CORE.Input.Keyboard.keyPressedQueue is now updated on SDL_KEYDOWN event instead. Co-authored-by: Arthur <[email protected]>
2024-04-10Update rcore_android.c (#3910)Aria
add gamepad previous button state tracking to Android
2024-04-08REVIEWED: Window positioning, avoid out-of-screen window-barRay
2024-04-02Remove trailing spacesRay
2024-03-29Fixing gamepad buttons not working in drm backend (#3888)MrMugame
* Fixing gamepad buttons in drm backend * Remove trailing spaces * Axis enumeration now works properly
2024-03-28Update rcore_drm.cRay
2024-03-28Organizing the drm backend to only use one api to allow for more devices (#3879)MrMugame
* Updating rcore_drm.c to only use one api for input * Change RPI log prefix to DRM * Remove relative checking which is not supported currently * Loop should continue on invalid event in drm backend * Fixed and cleaned up PollKeyboardEvents() in drm backend
2024-03-18Update rcore_desktop.cRay
2024-03-18Put GLFW in relative mouse mode when the cursor is disabled. (#3874)Jeffery Myers
2024-03-09Implement IsCursorOnScreen for PLATFORM_DESKTOP_SDL (#3862)Peter0x44
I did some testing and this seems to work okay, but it *is* different to GLFW. GLFW seems to lose "IsCursorOnScreen" for one frame upon pressing alt+tab over the window, without a different window covering it. SDL seems to have a more reasonable behavior for this case. Either way it's an edge case and I don't know the exact way to fix, likely requires internal GLFW changes.
2024-03-01Remove GLFW mouse passthrough hack and increase GLFW version in CMake (#3852)Alexandre Almeida
2024-02-29Review formattingRay
2024-02-29Fix SDL multitouch tracking (#3810)mooff
The fingerId from SDL was used as an index into the CORE.Input.Touch arrays, but it's an opaque / arbitrary int64, way bigger than MAX_TOUCH_POINTS, so the first non-simulated touch event would segfault.
2024-02-29Update GLFW to 3.4 (#3827)Alexandre Almeida
* Update GLFW to 3.4 (draft) * Add _glfwConnectNull() function to rglfw.c * Update rglfw.c * Update Makefile * Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND * Revert "Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND" This reverts commit 9e79abde786bf797d8133fd95e8a475cf6e2b066. * GlfwImport.cmake: Replace GLFW_USE_WAYLAND with GLFW_BUILD_WAYLAND * Update rglfw.c * Output platform selected by GLFW to TRACELOG * GLFW has removed Mir support
2024-02-24Gamepad rumble support with SDL2 (#3819)GideonSerf
* Added gamepad rumble to rcore_desktop.c and rcore_desktop_sdl.c Still need to add to the rest of the platforms. * Add SetGamepadVibration warnings to unimplemented platforms. * Added MAX_GAMEPAD_VIBRATION_TIME The rumble in SDL2 will continue for MAX_GAMEPAD_VIBRATION_TIME unless the user cancels it with a call to SetGamepadVibration(0.0f,0.0f,0.0f) * Cast float duration value to Uint 32 * Changed defines from int to float and fixed typo --------- Co-authored-by: Gideon Serfontein <[email protected]>
2024-02-04Add gamepad support to PLATFORM_DESKTOP_SDL (#3776)A
Co-authored-by: Arthur <[email protected]>
2024-02-01REVIEWED: macOS issues #3767Ray
2024-01-20Fix Android keycode translation and duplicate key constants (#3733)Alexandre Almeida
* Fix Android keycode translation * Simplify code a bit * Rename KEYCODE_MAPPED_NUM to KEYCODE_MAP_SIZE * Fix KEY_R and KEY_MENU duplicate * Update raylib_api.* by CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-20Make raylib/raygui work better on touchscreen (#3728)Hongyu Ouyang
* Fix that touch doesn't work for click/drag/raygui * Add comments * comments update
2024-01-13Simplified GetWindowScaleDPI() so it does not fetch the wrong DPI scale some ↵Karl Zylinski
times (Windows looks at center of window while the old raylib code looked on upper left corner of window, now it just uses the glfw function to fetch the window's current scaling). Also introduced a callback to update the CORE.Window.screenScaling when the content scaling updates, previously scaling did not work correctly on systems with multiple monitors that have different DPI scaling. (#3701)
2024-01-02Update copyright to 2024Ray
2023-12-28Fix SUPPORT_WINMM_HIGHRES_TIMER for PLATFORM_DESKTOP_SDL (#3679)ubkp
2023-12-23REVIEWED: SDL text input to Unicode codepoints #3650Ray
REVIEWED: GLFW naming conventions to reflect codepoints reading
2023-12-19Don't use a separate thread when polling for gamepad events on DRM platforms ↵Cinghy Creations
(#3641)
2023-12-17[rcore] Fix `ShowCursor()`, `HideCursor()` and review `SetMouseCursor()` for ↵ubkp
`PLATFORM_WEB` (#3647) * Fix ShowCursor(), HideCursor() and review SetMouseCursor() for PLATFORM_WEB * Add static to cursorLUT[] * Re-review SetMouseCursor()
2023-12-16Fix CORE.Input.Mouse.cursorHidden with callbacks for PLATFORM_WEB (#3644)ubkp
2023-12-16Fix fullscreen known issue 1 for PLATFORM_WEB (#3642)ubkp
2023-12-15Add ToggleFullscreen() and required changes for PLATFORM_WEB (#3634)ubkp
2023-12-15[rcore] Add `GetWindowPosition()` implementation for `PLATFORM_WEB` and ↵ubkp
fixes #3636 style/format (#3637) * Add GetWindowPosition() implementation for PLATFORM_WEB and fixes #3636 style/format * Remove double space
2023-12-14Add GetMonitorWidth() and GetMonitorHeight() implementations for ↵ubkp
PLATFORM_WEB (#3636)
2023-12-14REVIEWED: HighDPI support on Web platform #3372 -WIP-Ray
NOTE: The code is commented until the build system gets updated to latest emscripten.
2023-12-11[rcore] Complement `SetWindowState()` and `ClearWindowState()` for ↵ubkp
`PLATFORM_WEB` (#3625) * Complement SetWindowState() and ClearWindowState() for PLATFORM_WEB * Add FLAG_WINDOW_RESIZABLE to SetWindowState() and ClearWindowState() for PLATFORM_WEB
2023-12-11[rcore] Add `ToggleBorderlessWindowed()` implementation for `PLATFORM_WEB` ↵ubkp
(#3622) * Add ToggleBorderlessWindowed() for PLATFORM_WEB * Fix coding convention
2023-12-11Optimize gesture handling for PLATFORM_DRM (#3616)ubkp
2023-12-11[rcore] Fix real touch gestures for `PLATFORM_DESKTOP_SDL` (#3614)ubkp
* Fix touch gestures for PLATFORM_DESKTOP_SDL * Complement note and optimization * Events optimization * Optimize gesture handling * Reverts previous commit and fixes GESTURE_DRAG to not trigger GESTURE_SWIPE* when it ends * Reapply previous gesture handling optimization also fixing GESTURE_DRAG to not trigger GESTURE_SWIPE* when it ends
2023-12-07[rcore] Fix `IsMouseButtonUp()` for `PLATFORM_WEB` and `PLATFORM_DRM` (#3611)ubkp
* Fix IsMouseButtonUp() for PLATFORM_WEB * Fix IsMouseButtonUp() for PLATFORM_DRM
2023-12-07[rcore] Fix `IsMouseButtonUp()` and add touch events for ↵ubkp
`PLATFORM_DESKTOP_SDL` (#3610) * Fix IsMouseButtonUp() and add touch events for PLATFORM_DESKTOP_SDL * Fix coding convention
2023-12-07Fix IsMouseButtonUp() (#3609)Kenneth M
2023-12-07[rcore] Fix `IsKeyPressedRepeat()` for `PLATFORM_DESKTOP_SDL` (#3605)ubkp
* Fix IsKeyPressedRepeat() for PLATFORM_DESKTOP_SDL * Fix missing space
2023-12-05Fix GetKeyPressed and GetCharPressed for SDL (#3604)ubkp
2023-12-03Revert "Fix Windows Hardcoding (#3600)"Ray
This reverts commit 4ae2af0bccc2792e0f380152b8638bfa384595c6.
2023-12-03Revert "Fix warning while using external GLFW older than version 3.4.0 (#3599)"Ray
This reverts commit f1b0d15813098228369dd647ffc04a7dbd92c02a.
2023-12-03Fix Windows Hardcoding (#3600)mr sihc
Compiles on Linux & co. now
2023-12-03Fix warning while using external GLFW older than version 3.4.0 (#3599)Marco Maia
Co-authored-by: Marco Maia <[email protected]>
2023-12-01Remove a duplicated loop for PLATFORM_DRM (#3590)ubkp
2023-11-30Fix IsKeyPressedRepeat() for PLATFORM_DRM direct input (#3583)ubkp
2023-11-28Fix typos in src/platforms/rcore_*.c (#3581)RadsammyT
2023-11-28Fix SetMousePosition() for SDL (#3580)ubkp