1918 Commits

Author SHA1 Message Date
libretroadmin
82e4504968 Revert "(pt. 2) static variables are initialized to '0' automatically as per C rules"
This reverts commit 47410df7a3d2480dd8fc7fb97cf00319ce5e9344.
2024-11-19 03:03:05 +01:00
libretroadmin
47410df7a3 (pt. 2) static variables are initialized to '0' automatically as per C rules 2024-11-18 15:59:46 +01:00
Bernhard Schelling
c039576441
Fix quick shift key presses getting ignored on dinput driver (#17185)
Because shift keys were ignored in the event message  and only issued during polling, a quick key press and release between polling would get ignored.
This change also fixes left alt up key events getting issued (and sent to the core) twice.
2024-11-14 13:44:41 -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
Antonio Orefice
da5ecaa45a
Add OriginalAspect and OriginalAspectRot uniforms (#17123)
* 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
2024-11-02 04:04:12 -07:00
sonninnos
8ee6561a26
Vulkan: Use separate matrix for menu (#17134) 2024-10-29 12:03:37 -07:00
sonninnos
c847b02206
Integer overscale GPU screenshot crash fixes (#17118) 2024-10-26 06:45:45 -07:00
Viačasłaŭ
3019b926c2
Fix typos (#17068) 2024-10-01 17:36:33 -07:00
Colin Kinloch
63bd0b75d5
Reapply "wayland: Commit viewport resizes (#16419)" (#17026) (#17030)
This reverts commit 3ee3f2ae526e7a07b56b1da9397c0b0061632fe4.

Removing roundtrips seems to keep things snappy whilst fixing COSMIC.
2024-09-27 14:37:47 -07:00
Eric Warmenhoven
ea1b6852c5
apple: switch from MTKView to CAMetalLayer for vulkan (again) (#17045) 2024-09-27 14:36:45 -07:00
Colin Kinloch
c90f7aba6c
Use reverse DNS name for desktop file and icon (#16449)
Reverse DNS being com.libretro.RetroArch
2024-09-23 09:03:48 -07:00
alphabitserial
3ee3f2ae52
Revert "wayland: Commit viewport resizes (#16419)" (#17026)
This reverts commit 08496b302c7a9e4a080542df6b4a1e294a2a668a.
2024-09-22 23:44:48 -07:00
Eric Warmenhoven
187497eea8
Revert "apple: switch from MTKView to CAMetalLayer for vulkan (#16959)" (#17017)
This reverts commit 95d53183f5d3b8719a4c2d595b12de16da2e31af.
2024-09-19 11:48:40 -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
Emanuel Haupt
7a0d568f04
Incorporate FreeBSD port patches (#16221)
This commit imports a series of patches from the FreeBSD port of RetroArch to
improve build compatibility and address specific issues encountered in the
FreeBSD environment. These patches, sourced from the FreeBSD Ports collection
(https://cgit.freebsd.org/ports/tree/games/retroarch/files), have been adapted
and tested to ensure they integrate seamlessly with the current build process.
2024-09-10 18:11:40 -07:00
Eric Warmenhoven
cfbfd01f38
iOS: Last bits of iOS 12 support, including loading an older MoltenVK library (#16982) 2024-09-09 21:27:29 -07:00
libretroadmin
01a9745f5b Settings struct now has a flags variable 2024-09-08 22:49:26 +02:00
Eric Warmenhoven
95d53183f5
apple: switch from MTKView to CAMetalLayer for vulkan (#16959) 2024-09-03 19:02:00 -07:00
Ethan Lee
b74932a05a
vulkan: VK_SUBOPTIMAL_KHR can be treated as success, not failure (#16930)
Fixes #16917
2024-08-27 10:23:10 -07:00
libretroadmin
c99c5399f5 Move C Vulkan code over from shader_vulkan.cpp to vulkan_common.c 2024-07-22 00:52:53 +02:00
libretroadmin
afc9cb509a CXX_BUILDFIX buildfixes 2024-07-20 19:42:45 +02:00
Joseph C. Osborn
6701c0999b fake negative x/y viewport positions under vulkan
Since Vulkan doesn't support negative x or y viewport positions, this
patch concatenates a translation matrix to the projection matrix used in
Vulkan rendering. In this way, if a negative x or y coordinate would
be necessary, we can instead use a 0 coordinate and a
leftwards/upwards translation to achieve the same effect.  This seems
to work alright with overlays, so as far as I can tell this patch
seems sufficient to get the behavior we want?
2024-07-18 08:22:32 -05:00
zoltanvb
286d65b42e [X11] Support for mouse buttons 4 and 5
Support added for extra mouse buttons. Since these buttons were
not returned by XQueryPointer(), some additional logic was needed
which fit best to scroll wheel handling.
2024-06-25 08:18:51 -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
schellingb
e7c6d1df84 Fix keyboard events missing RETROKMOD_NUMLOCK or RETROKMOD_SCROLLOCK
- Add missing numlock mod to dinput
- Add missing scrolllock mod to x11
- Add missing capslock, numlock, scrolllock and meta mods to android
- Add missing scrolllock mod to sdl
- Add missing capslock, numlock, scrolllock and meta mods to switch
- Add missing numlock mod to winraw
- Add missing numlock mod to uwp
2024-06-25 08:18:29 -05:00
rofl0r
843c816fc2 x11: add support for Xss screensaver disabling
in case xdg-screensaver isn't installed.
2024-06-16 12:54:42 -05:00
Reilly Brogan
7f3de64ef8 wayland: Fix Wayland appId 2024-05-30 22:54:50 -05:00
Bernhard Schelling
e27fcf64a8 (Win32) Fix numlock/pause key release events
On Win32, the numlock and pause keys need special handling. But the existing code did only handle it correctly for pressing and not releasing. It separately called GetKeyState for the two keys which only returned true while pressing a key and not while releasing it. This then caused the releasing of the pause key to be treated as releasing the numlock key and vice versa. This fix handles releasing the two keys correctly.
2024-05-19 12:23:07 -07:00
Carlo Refice
fed2e10d97 Implement HDR readback 2024-05-17 14:10:29 -07:00
Viačasłaŭ Chalikin
9ad2cc2bc6
Fix crash when using threaded video (#16518)
for Mesa 23.2 and later
2024-05-13 07:24:51 -07:00
Eric Warmenhoven
55be94212a
macOS: MoltenVK as xcframework (#16507) 2024-05-08 16:41:15 -07:00
Brad Smith
d55f95f056
Windows mouse ungrab must release the mouse instead of confine it to the current desktop (#16488)
* Windows mouse ungrab should release the cursor, instead of confining it to the current screen.

* conform to style
2024-05-04 06:10:57 -07:00
Eric Warmenhoven
ca904a3f5d
iOS/tvOS: MoltenVK 1.2.8, and fix mame core signing (#16452) 2024-04-19 07:11:49 -07:00
Carlo Refice
adaa19cbf7
vulkan: Add support for A2R10G10B10 HDR format (#16435) 2024-04-18 07:34:46 -07:00
Eric Warmenhoven
5fd4eb905c
iOS QOL improvements (#16444)
* iOS/tvOS: bundle cores as frameworks as opposed to dylibs

* iOS/tvOS: update plist to indicate controller support

* iOS/tvOS: living within the sandbox

* iOS/tvOS: import content through share sheet

* iOS/tvOS: default audio sync off due to crash on background

* iOS/tvOS: don't try altkit if there's no reason to

* iOS/tvOS: enumerate cores for appstore distribution
2024-04-18 03:01:39 -07:00
Colin Kinloch
917c2b0d15
wayland: Use frontend signal handler to quit (#16418) 2024-04-08 16:56:29 -07:00
Colin Kinloch
08496b302c
wayland: Commit viewport resizes (#16419)
This allows a resize to keep up with the users pointer movements.
2024-04-08 16:56:20 -07:00
libretroadmin
a7e1a6c8ce DM_INTERLACED seems not defined for MSVC 2005 - so exclude it for MSVC
versions prior to 2010
2024-04-06 23:07:25 +02:00
libretroadmin
a7f6dced8d Expand win32_monitor_set_fullscreen 2024-04-06 22:16:00 +02:00
Colin Kinloch
0212d8e770
wayland: Ignore splash sized events during splash (#16412) 2024-04-05 11:02:33 -07:00
Colin Kinloch
9749940c67
wayland: Let wl_display_disconnect close fd (#16407) 2024-04-05 07:39:45 -07:00
Colin Kinloch
cdd6aed8ec
wayland: Ignore configure events during splash (#16398)
These were causing the gl/vk surfaces to be created with the wrong size.
2024-04-02 17:55:02 -07:00
Cristi Mitrana
b541d1e2d3
gfx/drm: fix mode vrefresh calculation (#16376)
When using an interlaced/doublescan mode, the vertical refresh rate is mis-calculated.
Replaced the current calc method with the one from libdrm's 'modetest' utility [1].

[1] https://gitlab.freedesktop.org/mesa/drm/-/blob/main/tests/modetest/modetest.c?ref_type=heads#L140
2024-03-20 14:02:51 -07:00
Themaister
ee64f59b18 vulkan: Remove use of oldSwapchain.
Works around a hang on gamescope. oldSwapchain generally isn't useful
after all. Just use the same code paths everywhere.
2024-03-06 12:49:52 +01:00
aerisarn
8b1e4a1ad0
MESA UWP Integration (#16285)
* [WINRT] Enable logging on __WINRT__ and bypass verbosidy in debug

* [UWP] wrong configuration prevents GLES to compile, common functions defines GL symbols

* [UWP] configure project to allow OPENGL on default configuration and copy MESA DLLs into UWP release

* [UWP] add MESA headers

* [UWP] add MESA EGL.lib needed for GLES context. However HAVE_OPENGL is better as GL cores use desktop version, so this is left for reference and to make the solution build with HAVE_OPENGLES

* [UWP] UWP is missing some GDI function definitions, implemented into MESA Gallium

* [UWP] Configure Release project too

* [UWP] Add mesa alpha-2 release dlls

* [UWP] allow griffin and vide_driver to have an OPENGL context

* [UWP] allow wgl context to work with mesa under WINRT

* [UWP] BUG: have to modify height/width getters and align them to MESA because the screen resolution is not right in gl context. Pending further investigation

* [UWP] fix ANGLE build

* [UWP] remove duplicate import code.

* (UWP) Cleanup filters file

* MESA screen destroy fix and Yabasanshiro hack. Align to alpha-2-hack tag

---------

Co-authored-by: Gabriel Morazán <35014183+GABO1423@users.noreply.github.com>
2024-03-02 09:36:17 -08:00
sonninnos
55f1120036
(WIN32) Read menubar shortcuts with menubar hidden (#16291) 2024-02-26 06:01:33 -08:00
Bobby Smith
c43f4738d9
Fullscreen/windowed fixes when using overrides (#16213) 2024-02-09 11:54:46 -08:00
Ophidon
7b711214a7
Slang Subframe Shaders Feature (#16209)
Adds support for sub-frame shaders to vulkan/glcore/dx10-11-12.

Builds on the concept already present for frame duplication in use for BFI, to present multiple 'sub' frames per real frame to the shaders, so they can run at a higher framerate than the content framerate. Must be enabled via subframe shaders setting under synchronization settings to be active.

Will allow BFI to be implemented inside of the shaders, among any other use for the higher framerate shader authors can devise.

CurrentSubFrame and TotalSubFrames have been available inside the shaders to track what they want to do on an given subframe. TotalSubFrames will always be 1 when the setting is disabled (and when in menu/ff/pause). Framecount will not increment on sub-frames, as it does not for injected bfi frames now. Should not interfere with any existing shaders that do not check for subframes.
2024-02-09 03:12:55 -08:00
Ophidon
72c901a90e
Squashed commit of the following: (#16142)
commit 793d41c303206b43932ddcefd44a45836def55eb
Author: Ophidon <jrogers2@gmail.com>
Date:   Fri Jan 19 23:12:31 2024 -0500

    Build Fix 2

    Move declarations of iterators.

commit c0e959b3d3cd773a66a17cfe034f08eaa53d525a
Author: Ophidon <jrogers2@gmail.com>
Date:   Fri Jan 19 22:57:01 2024 -0500

    Build Fix

    Help string was 14 characters too long for c89.

commit fc5506c7906bf82d6f88b7b0d7e4764d58d90622
Author: Ophidon <jrogers2@gmail.com>
Date:   Fri Jan 19 22:40:45 2024 -0500

    BFI Updates

    Significant BFI updates.

    - Adds BFI to dx10/11/12 in general.

    - Updates existing BFI menu option descriptions to be somewhat more clear in how to use correctly.

    - Adds Variable Strobe length via new 'Dark Frames' bfi sub-choice. Only valid at 180hz and above, as it must work with whole frames.

    - Algorithm to auto select 'decent' Dark Frames choice, for any given selected BFI refresh rate. Will also avoid defaults that can cause Image Retention at any Hz higher than 120. (Impossible to avoid at 120 if you have an affected screen... get an OLED :D ) .

    - Some sanity checking on selecting BFI or the other synchronizations options like Swap Interval > 1, that don't play well with BFI.
2024-01-19 23:11:31 -08:00