Commit Graph

5443 Commits

Author SHA1 Message Date
Ray
5bbb2fc1df REVIEWED: Wayland checks, using compilation flags when possible #5564 2026-02-17 13:22:11 +01:00
4678a544b6 [rcore][glfw] Fix window scaling on Wayland with GLFW 3.4+ (#5564)
* Fix window scaling on Wayland with GLFW 3.4+ display scaling

GLFW 3.4 defaults GLFW_SCALE_FRAMEBUFFER to TRUE on all platforms,
causing framebuffer/window size mismatch on Wayland with display
scaling (content renders in a subset of the window, mouse coordinates
are wrong).

Three fixes:
- Disable GLFW_SCALE_FRAMEBUFFER on Wayland when FLAG_WINDOW_HIGHDPI
  is not set, restoring 1:1 window-to-framebuffer mapping
- With FLAG_WINDOW_HIGHDPI, read actual framebuffer size from GLFW
  instead of resizing the window (which double-scales on Wayland
  where GLFW_SCALE_TO_MONITOR has no effect)
- Skip mouse coordinate scaling on Wayland since GLFW already reports
  coordinates in logical (window) space

Tested on NixOS/Niri with GLFW 3.4 at 1x, 1.5x, and 2x scaling.

Fixes #5504

* Fix fullscreen and borderless windowed scaling on Wayland with HiDPI

ToggleFullscreen and ToggleBorderlessWindowed exit paths manually
scale screen size by DPI before passing to glfwSetWindowMonitor,
which double-scales on Wayland where GLFW_SCALE_FRAMEBUFFER already
handles it. Skip the manual resize on Wayland.

Also fix FramebufferSizeCallback fullscreen branch: on Wayland with
GLFW_SCALE_FRAMEBUFFER the framebuffer is still scaled in fullscreen,
so use the logical window size as screen size and derive screenScale
from the framebuffer/window ratio.

Fixes #5504

* Apply style fixes from code review: remove duplicate screenScale assignment, collapse single-statement ifs to one line, remove trailing periods from comments
2026-02-17 12:43:52 +01:00
Ray
b871a556d7 Init framebuffer using render size (should be same as currentFbo) 2026-02-17 12:13:04 +01:00
6564cea6a3 Fixed doesn't property load when 1 frame animation. (#5561) 2026-02-15 20:15:25 +01:00
Ray
059ebaa6ad REVIEWED: HIghDPI content scaling on macOS 2026-02-15 15:02:04 +01:00
Ray
d01f158bd5 REVIEWED: Window initialization on HighDPI monitor (Windows) #5549 2026-02-15 13:21:08 +01:00
Ray
180c3c13ba REVIEWED: GetImageColor() #5560 2026-02-14 22:22:31 +01:00
Ray
dbca900255 Merge branch 'master' of https://github.com/raysan5/raylib 2026-02-14 22:18:03 +01:00
Ray
1061daf197 REVIEWED: Installed libraries #5550 2026-02-14 22:17:49 +01:00
fb5bc42190 update camera pan speed (#5554) 2026-02-14 22:16:09 +01:00
Ray
8e81ca0e60 Update win32_clipboard.h 2026-02-12 19:08:48 +01:00
Ray
dcd813068b Update raylib.h 2026-02-12 18:55:42 +01:00
Ray
070082f8c9 REVIEWED: Comments to impersonal format 2026-02-12 18:55:40 +01:00
4e7c38ac43 fix SDL SetGamepadMappings (#5548) 2026-02-12 17:04:22 +01:00
Ray
3aced1fd7c Update rmodels.c 2026-02-10 18:02:42 +01:00
Ray
48ec41f0ec Update raylib.h 2026-02-10 18:02:36 +01:00
Ray
efda35b309 Update win32_clipboard.h 2026-02-10 00:37:45 +01:00
3b647c85e1 raymath: wrap float3 and float16 for consistency with other types (#5540) 2026-02-10 00:05:35 +01:00
Ray
b39cc6bce7 Update win32_clipboard.h 2026-02-09 23:28:02 +01:00
Ray
7e59e1d93d REVIEWED: Formating 2026-02-09 22:29:47 +01:00
Ray
84f75785ee Update rcore.c 2026-02-09 22:29:13 +01:00
Ray
f190c6a4d4 Update rcore.c 2026-02-09 22:27:16 +01:00
Ray
e67dc15a52 Update rcore_desktop_glfw.c 2026-02-09 22:25:55 +01:00
Ray
f6910bc1e0 Update rcore_drm.c 2026-02-09 22:25:52 +01:00
Ray
a654beb565 REVIEWED: Comments 2026-02-09 22:25:20 +01:00
Ray
eba1fca933 Update rcore.c 2026-02-09 22:24:44 +01:00
Ray
49cd2ddaa1 Update rcore.c 2026-02-09 22:24:07 +01:00
Ray
c4baa5b81d REVIEWED: Comments 2026-02-09 22:23:23 +01:00
5a36ce5e7c [rcore] Implemented SetWindowMaxSize, SetWindowMinSize, and SetWindowSize (#5536)
* implemented SetWindowMaxSize, SetWindowMinSize and SetWindowSize

* removed outdated warning

* prevented incompatible size limits
2026-02-09 13:00:18 +01:00
a6fa8b9ff4 Fix out of bound Memory read in Material.maps (#5534)
* Fix out of bounds Memory read in Material.Maps by using the MATERIAL_MAP_SPECULAR define instead of the SHADER_LOG_SPECULAR enum

* Fix out of bounds Memory read in Material.Maps by using the MATERIAL_MAP_SPECULAR define instead of the SHADER_LOG_SPECULAR enum
2026-02-06 13:58:27 +01:00
Ray
4f76b896d5 REVIEWED: CheckCollisionLines(), formating and follow raylib conventions 2026-02-06 10:55:42 +01:00
3881d2aac2 Fix: Detect collision if one line is almost vertical (#5510) (#5531) 2026-02-05 19:21:45 +01:00
f43e049444 Refactor removing extra space and add break line for { (#5533)
Co-authored-by: maiconpintoabreu <maicon@thinkpad02.exads.com>
2026-02-05 15:10:55 +01:00
d4f636151b refactor to follow the CONVENTIONS.md (#5530)
Co-authored-by: maiconpintoabreu <maicon@thinkpad02.exads.com>
2026-02-04 19:43:55 +01:00
a96cbe0183 Close opened directory (#5529) 2026-02-04 19:42:44 +01:00
4c1efc2bd3 [rcore] Fix native win32 window minimizing/maximizing (#5524)
* fixed typos preventing window from min/maxing

* fixed window style generation ignoring minimize precedence, causing errors in edge cases

* added maximize button on resizable windows

* fixed infinite loop when resizing the window manually

* activate window upon creation to set focus and show taskbar icon

* extended SanitizeFlags() to account for problematic resizing/mizing flag mixups
2026-02-04 19:37:12 +01:00
ccfa3f762a fixed an issue when using an empty window title (#5526) 2026-02-03 23:12:13 +01:00
Aly
33dcd62663 Added documentation comments for (#5525) 2026-02-02 11:21:10 +01:00
403c2cbccf trivial: Correct typo in log message. (#5523)
* trivial: Correct typo in log message.

* trivial: Correct typo in rlparser.
2026-01-31 23:18:52 +01:00
1aafd3c4a4 fixed win32 vsync flag not being applied (#5521) 2026-01-31 23:17:55 +01:00
08e79a16b0 Refactoring {0} to { 0 } to follow conventions (#5519)
Co-authored-by: maiconpintoabreu <maicon@thinkpad02.exads.com>
2026-01-29 17:30:03 +01:00
Ray
de7fc12be0 REVIEWED: IsGamepadButton*() for consistency with key and mouse equivalents 2026-01-28 19:35:54 +01:00
Ray
8a2da96eed Reviewed formating and spacing 2026-01-28 19:34:55 +01:00
af37fa2a96 Refactoring based on Coding Style Conventions (#5517)
Co-authored-by: maiconpintoabreu <maicon@thinkpad02.exads.com>
2026-01-28 19:27:03 +01:00
d0a6892989 [rcore] IsMouseButton*(), random key codes return unexpected results (#5516)
* update

* update

* stuff

* update

* move headerfile to root

* delete .h

* update ignore

* fix IsMouseButtonDown\Pressed\Released\Up will get randomly returned to true when the button code is outside the range of mouse button

* remove unessary macro

* refactor IsMouseButton*() early returns
2026-01-28 19:26:07 +01:00
63e4fd838d fixed typos preventing launch of native win32 backend (#5515) 2026-01-27 17:38:51 +01:00
3568b6e293 [rtext] Fix and enhance TextReplace() function (#5511)
* add check for replacement,replace strcpy,strncpy with memcpy

* add 4 spaces in if statement

* add spaces
2026-01-26 12:04:22 +01:00
Ray
6986183858 Merge branch 'master' of https://github.com/raysan5/raylib 2026-01-25 19:06:11 +01:00
Ray
65cddc852e Reviewed comments 2026-01-25 19:06:08 +01:00
afe74c1c70 Refactor int to float missing parse (#5503)
* refactor int to float parse

* Reverting  as requested

---------

Co-authored-by: Maicon <maicon@thinkpad02.exads.com>
2026-01-24 21:53:22 +01:00