summaryrefslogtreecommitdiffhomepage
path: root/src/platforms
AgeCommit message (Collapse)Author
2024-07-16Adding GetKeyName(int key) (WIP) (#4161)MrScautHD
2024-07-09`WindowSizeCallback()` should not try to handle DPI since already managed by ↵SuperUserNameMan
GLFW (#4143) If `FLAG_WINDOW_HIGHDPI` is set, `InitPlatform()` will aks GLFW to handle resize window content area based on the monitor content scale using : ` glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); ` So `WindowSizeCallback()` does not have to handle it a second time.
2024-07-09REVIEWED: Code formatting to follow raylib conventionsRay
2024-07-09update RGFW to RGFW 1.0 (#4144)Colleague Riley
* update RGFW * fix bug with GetCurrentMonitor
2024-07-08Minor tweaksRay
2024-07-08Add workaround for NetBSD (#4139)NishiOwO
2024-07-04Change SDL_Joystick to SDL_GameController (#4129)Frank Kartheuser
With SDL_Joystick my game controller wasn't working properly. That's why I changed it to SDL_GameController.
2024-07-01WARNING: BREAKING: Renamed `PLATFORM_DESKTOP` to `PLATFORM_DESKTOP_GLFW`Ray
This could potentially be a breaking change, for consistency, now every possible desktop backend has the proper name assigned: GLFW, SDL, RGFW raylib build system has been reviewed to fallback to `PLATFORM_DESKTOP_GLFW` by default when `PLATFORM_DESKTOP` defined
2024-07-01Minor tweaksRay
2024-07-01Update Storage base path, use provided SDL base pathRay
2024-06-30REVIEWED: Formatting, follow raylib coding conventionsRay
2024-06-30REVIEWED: Formatting, follow raylib coding conventionsRay
2024-06-28Update RGFW and replace long switch in rcore_desktop_rgfw.c with a lookup ↵Colleague Riley
table (#4108) * Fix Makefile issues (RGFW) (linux) (macOS) * Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW) * remove #define RGFWDEF and make the #undefs only happen for their OS * Update RGFW.h * fix to match the RGFW updates * remove line that shows the cursor for no reason * Update RGFW, replace long switch with an array, update rgfw platform for RGFW * update RGFW (fix reported glitch with drag and drop files) (linux) * remove u16
2024-06-17fixed issue with GetScreenWidth/GetScreenHeight (#4074)Anthony Carbajal
2024-06-08Update RGFW (#4048)Colleague Riley
* Fix Makefile issues (RGFW) (linux) (macOS) * Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW) * remove #define RGFWDEF and make the #undefs only happen for their OS * Update RGFW.h * fix to match the RGFW updates * remove line that shows the cursor for no reason
2024-06-04Update rcore_desktop.cRay
2024-05-21Update rcore_desktop_sdl.cRay
2024-05-21Call SDL_GL_SetSwapInterval() after GL context creation (#3997)JupiterRider
2024-05-16[rcore_web] Relative mouse mode issues. (#3940)Cemal Gönültaş
* [rcore_web] Relative mouse mode issues. * Review formatting.
2024-05-10remove #define RGFWDEF and make the #undefs only happen for their OS (RGFW) ↵Colleague Riley
(#3971) * Fix Makefile issues (RGFW) (linux) (macOS) * Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW) * remove #define RGFWDEF and make the #undefs only happen for their OS
2024-05-07make RGFW a custom platform (#3941)Colleague Riley
* fix minor bugs and errors (x86) for the RGFW platform, update RGFW platform license, update makefile info for RGFW platform * revert * (RGFW) (winapi) fix mouse hide bug when cursor changes * ensure PLATFORM_SHELL is defined (PLATFORM_RGFW) --------- Co-authored-by: ColleagueRiley <[email protected]>
2024-05-07Implementing GetMonitorWidth/Height for DRM (#3956)gabriel-marques
* Implementing GetMonitorWidth/Height and GetMonitorPhysicalWidth/Height for drm Added implementation for DRM for functions : - GetMonitorWidth() - GetMonitorHeight() - GetMonitorPhysicalWidth() - GetMonitorPhysicalHeight() - GetMonnitorName() These functions take an argument but only the value 0 is accepted. This is because the DRM platform implementation manages only one screen for now * Refactor "GetMonitor" properties for DRM Platform Refactored GetMonitorHeight, GetMonitorWidth, GetMonitorPhysicalHeight, GetMonitorPhysicalWidth and GetMonitorName to accept only argument "0" as more than one screen is not supported in DRM platform.
2024-05-05[rcore_desktop] Fix 3693 initial window geometry (#3950)Christian Haas
* Rework window placement and dimensions for multi-monitor setups; - fullscreen apps use primary monitor, exclusively - non-fullscreen apps come in two variants: a) pre-determined window size by user b) use-active-monitor dimensions by user specifying 0x0 Either way, the window shall be centred at the monitor where it was created This may have been the original intent, yet the primary monitor was used also for the second case, regardless where the window opened. * Clean up code, handle error, fix integer-overflow for centering windowed fullscreen
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()