1008 Commits

Author SHA1 Message Date
Aramis
2c3e53e4e8
fix for closing window (#17301) 2024-12-28 17:26:04 +01:00
LibretroAdmin
b8c9665753 Fix typo 2024-12-28 00:44:56 +01:00
LibretroAdmin
e6373f2869 Position Latency accurately in statistics 2024-12-28 00:33:40 +01:00
LibretroAdmin
0d4eeb647a Warning cleanups/unused variables removal 2024-12-27 15:39:32 +01:00
LibretroAdmin
18c85b5ccd Cleanups -
* Less string copies
* Some general cleanups
* Add extra param to runloop_message_queue_push so we can pass size_t
of the message
* Consistent conventions for local variable usage for certain things
2024-12-27 15:13:45 +01:00
libretroadmin
92f134fb87 video_driver_frame - optimize string handling 2024-12-25 23:33:50 +01:00
libretroadmin
44238e909f Consistent viewport naming conventions 2024-12-24 22:50:51 +01:00
libretroadmin
8074a833aa Cleanups/less string copies and indirection 2024-12-24 21:07:31 +01:00
zoltanvb
6a85844b41
Pointer sanitization - x11, udev (#17281)
Adapt the sanitized pointer handling, discussed at #17196 :

X11 driver specific changes:

    make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
    remove extra "inside" checks, general simplification
    enable pointer offscreen reporting

Udev driver specific changes:

    remove custom calculation and use common viewport translation
    unify pointer query instead of separate _x and _y
    enable pointer offscreen reporting

Other changes:

    more tuning of pointer conversion in video_driver.c for edges
    lightgun button ID conversion moved to input_driver.c
2024-12-24 07:08:58 -08:00
libretroadmin
442b9bc3da Syntax style nits 2024-12-23 05:44:40 +01:00
zoltanvb
072d949346
Pointer handling sanitization - wayland and libretro.h changes (#17277)
Adapt the sanitized pointer handling, discussed at #17196:

Wayland driver specific changes:
- make sure pointer position is always within [-0x7fff,0x7fff]
  by using the confined wrapper
- enable lightgun to report -0x8000 if pointer is really offscreen
- remove extra "inside" checks
- report same pointer/lightgun coordinates for all ports
- simplify pointer and lightgun handling

Other changes:
- unify "offscreen" condition through input_driver.c
- slight tuning of pointer conversion in video_driver.c
- update libretro.h with explanation and pointer offscreen value
- small fixes on remote retropad test screen
2024-12-21 13:28:27 -08:00
zoltanvb
30a656738b
Introduce video_driver_translate_coord_viewport_wrap clamping variant. (#17196)
Add another version of the coordinate translation that will not
report -0x8000 for offscreen values, but instead map the position
to the respective edge (0x7fff/-0x7fff). Not yet in use.

Udev driver updated to use the wrapper, as all other input drivers do.
2024-12-19 13:30:43 -08:00
libretroadmin
2809421d4e Revert "static variables are initialized to '0' automatically as per C rules"
This reverts commit 2a0984b6e47b5f714ce4a360afeaadafdb634c36.
2024-11-19 03:03:13 +01:00
libretroadmin
2a0984b6e4 static variables are initialized to '0' automatically as per C rules 2024-11-18 15:33:34 +01:00
sonninnos
e09039c77f
Disabled menu buildfixes (#17184)
* Disabled menu buildfixes

* Skip thumbnail features with menu disabled
2024-11-14 13:44:50 -08:00
Antonio Orefice
2a56a827e8
Add Frametime Uniforms (#17155)
* Initial implementation of CoreAspect uniform

* float -> float_t

* Possibly fix wii_u building

* vulkan: use float instead of float_t;

* slangp: Advertise support of CoreAspect uniform
by defining _RARCH_HAS_COREASPECT_UNIFORM early in the shader source, just after "#extension GL_GOOGLE_cpp_style_line_directive : require"

* CoreAspect + glsl fix: use glUniform1f()

* Add CoreAspectRot uniform.
It reports CoreAspect value or 1/CoreAspect when the content is rotated by 90 or 270 deg.

* Fixed stupid typo

* Just use _HAS_COREASPECT_UNIFORMS to check for CoreAspect uniforms support (was _RARCH_HAS_COREASPECT_UNIFORMS)

* Rename CoreAspect, CoreAspectRot, _HAS_COREASPECT_UNIFORMS to OriginalAspect, OriginlAspectRot, _HAS_ORIGINALASPECT_UNIFORMS

* GLCore: void Pass::build_semantic_float needs glUniform1f.
...how on earth did it worked for UBO !?

* d3d10,11,12, wrong function called by overlook.

* Add test shader, will remove that before PR

* Fix metal rotated aspect reporting

* remove test shader

* Fix C89 Build

* Use OriginalAspectRotated instead of OriginalAspectRot

* Add CoreFPS and FrameTimeDelta Uniforms.
_HAS_ORIGINALASPECT_UNIFORMS is (#)defined and can be used to query for them.

* add test shader

* remote test shader

* Wrong paste.

* gx2: use float

* wrong indentation

* resolved merge conflict

* fix indentation

* Fix comment/Formatting

* Change uniform name from CoreFPS to OriginalFPS

* underliyng references: core_fps -> original_fps
2024-11-12 19:50:59 -08:00
LibretroAdmin
e45bc853ec
Revert "Pointer confinement support (opt-in) (#17169)" (#17173)
This reverts commit 90ee413a81c30e26a8e9b141a6716dc979607b87.
2024-11-07 07:31:47 -08:00
zoltanvb
90ee413a81
Pointer confinement support (opt-in) (#17169)
New environment set call to enable a bit more sensible handling of
absolute pointing devices (pointer and lightgun). With the
confinement enabled, pointing devices will not return neither
-0x8000 nor (0,0), which was anyway dependent on the input driver,
instead they will stay at the extreme edge.
2024-11-06 15:19:08 -08:00
sonninnos
ae202515f6
Integer scale crash fix (#17170) 2024-11-06 14:35:33 -08:00
sonninnos
767be489d9
Custom aspect ratio safeguards (#17168) 2024-11-06 11:06:21 -08:00
sonninnos
71ed81dc38
Integer scale Y axis half step tweak (#17154) 2024-11-03 18:14:27 -06:00
sonninnos
273178b979
Integer scale X axis corrections (#17151)
* Integer scale X axis corrections

* Integer scale: Fall back to normal scale when content is larger than viewport
2024-11-02 09:40:11 -07:00
sonninnos
cbafa3b513
Integer scale 'smart' tweak (#17139) 2024-10-30 17:56:56 -07:00
sonninnos
73fc26c132
RGUI integer scale fix (#17099) 2024-10-15 19:08:58 -07:00
sonninnos
84b58dd001
Pixel perfect integer scaling improvements (#17098) 2024-10-14 14:44:10 -07:00
sonninnos
1e1b24c359
Show also current frame cache size in stats (#17056) 2024-09-28 23:53:26 -05:00
sonninnos
7cb1543edd
Use frame cache size in integer scaling instead of av info geometry (#17057) 2024-09-28 23:53:14 -05:00
sonninnos
ea9a086f82
MSVC buildfix (#17061) 2024-09-28 23:52:37 -05:00
sonninnos
ecd626ec5e
Automatic Frame Delay: More improvements (#17041) 2024-09-27 14:37:11 -07:00
sonninnos
4b177d0ac7
Refresh rate switching fixes and cleanups (#17021) 2024-09-20 20:09:02 -07:00
sonninnos
dbfb88721b
Automatic Frame Delay: Fix special overtime edge case (#17013) 2024-09-18 02:45:07 -07:00
sonninnos
6713e3b7f7
(Vulkan) Prefer IMMEDIATE mode without vsync (#17009)
* (Vulkan) Prefer IMMEDIATE mode without vsync

* Clamp max_swapchain_images and hard_sync_frames

* (Vulkan) Improve fastforward frameskip option hack
2024-09-17 10:23:02 -07:00
libretroadmin
787c1e1130 video_monitor_compute_fps_statistics - turn static 2024-09-11 17:23:28 +02:00
Eric Warmenhoven
60ee32b879
apple: display server, including ProMotion support (#16963) 2024-09-04 22:52:59 -07:00
sonninnos
3f8dc5c49d
Remove 'Frame Rest' (#16936) 2024-08-29 03:35:09 -07:00
sonninnos
391b46c3be
Automatic Frame Delay refactor (#16929) 2024-08-27 01:53:10 -07:00
Joe Osborn
439c672c22
Support viewport bias with integer overscale and custom aspect ratios (#16915)
* support integer overscale with bias and xy offsets

* support custom aspect ratios with viewport bias
2024-08-22 12:40:40 -07:00
kwyxz
4016b2524b
Allow building RetroArch with menu disabled (#16881)
* allow building with --disable-menu --disable-cheevos --disable-qt --disable-slang

* allow building with cheevos while disabling menus and qt
2024-08-15 15:26:59 -07:00
Eric Warmenhoven
fdf2faaf59
macOS: Don't include video/input drivers when compiling with SDL2 (#16865) 2024-08-10 17:56:03 -07:00
Joseph C. Osborn
a7bc0ad68f Make custom aspect ratios under integer scaling respect xy offset
This makes them more usable.  I don't understand why it was ever
disallowed, can someone review and let me know?
2024-07-18 08:22:42 -05:00
Joseph C. Osborn
7e26eb37c6 fix custom aspect ratios for non-ydown drivers 2024-07-18 08:22:42 -05:00
Joe Osborn
9489a11ead Use device ratio when determining portrait orientation 2024-06-26 08:45:29 -05:00
Joe Osborn
f1b9df4faf Flip default y positive direction for viewport calc
This should fix metal and maybe some directx resizes
2024-06-26 08:45:29 -05:00
Joseph C. Osborn
00add4bb37 Fix build errors on wiiu, directx 2024-06-25 08:18:39 -05:00
Joseph C. Osborn
2805694378 Refactor viewport handling/aspect ratio scaling.
This mirrors the use of video_viewport_get_scaled_integer for
non-integer scaling at various aspect ratios.  Two variants are
provided, one with implicit device and desired ratios and one with
explicit ratios.

Also added a flag to video_viewport_get_scaled_integer to indicate the
direction of positive y.
2024-06-25 08:18:39 -05:00
zoltanvb
cc92ac7577 Fix exclusive fullscreen condition
Spotted in Android compilation:
warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
2024-06-25 08:18:07 -05:00
zoltanvb
2ca973770f Fullscreen refresh rate improvements
Handle refresh rate as float in general, and add also extra
attributes (interlaced, doublescan) for video modes.

Make it possible to select exact mode (interlaced / doublescan modes
will not be selected), and allow close matches such as 49.5 Hz
for PAL 50 Hz.
2024-06-17 13:29:40 -05:00
zoltanvb
926ba5c843 Force fullscreen in case of KMS display
Change GL2, GL3 and Vulkan drivers to behave as fullscreen if context driver
(such as KMS/DRM or KHR) does not support windowed mode at all.
Take it into account also for refresh rate switch.
2024-06-14 15:44:38 -05:00
sonninnos
87a339c3c9
Set compute fps stats logging to debug level (#16460) 2024-04-23 09:53:35 -07:00
libretroadmin
f70dc90729 Add C99/C11 rule - use llabs if C99/C11 is availabl,e otherwise use labs 2024-04-06 18:28:19 +02:00