3907 Commits

Author SHA1 Message Date
twinaphex
5b1872f6be retroarch.c - some cleanups - retroarch_set_frame_limit - return
value - other cleanups
2021-09-07 12:29:44 +02:00
twinaphex
10782f9abc Cleanups - move code over to menu_driver.c 2021-09-07 11:55:12 +02:00
twinaphex
3a78b46862 Move code to input_driver.c 2021-09-07 10:17:06 +02:00
twinaphex
138afafbb3 generic_menu_entry_action - cleanup 2021-09-07 08:35:27 +02:00
twinaphex
71067d8873 Preinitialize varaibles in video_driver_translate_coord_viewport 2021-09-07 08:11:32 +02:00
twinaphex
a0856c9847 Move another function to menu_driver.c 2021-09-07 07:14:27 +02:00
twinaphex
722166cb15 Move functions from retroarch.c to input_driver.c 2021-09-07 07:11:42 +02:00
twinaphex
7c665702a8 Move input_driver_toggle_button_combo to input_driver.c 2021-09-07 06:50:18 +02:00
twinaphex
19f4504943 Prevent collision with quasi88 in statically linked cores 2021-09-03 21:29:38 +02:00
bulzipke
8adc24ecbc
(3DS) Add bottom screen menu (#12470)
* (3DS) Add bottom screen menu
 -> User can save/load state on botom screen with thumbnail.
 -> Call a save_state_to_file() when RAM state has data to write a disk.
 -> If the bottom screen needs updating, swap the bottom framebuffers.

Add: SAVE/LODE STATE TO RAM
 -> This is useful for devices with slow I/O
 -> 3DS bottom save state use CMD_EVENT_SAVE_STATE_TO_RAM
 -> 3DS bottom load state use CMD_EVENT_LOAD_STATE when RAM state has no data
 -> 3DS bottom load state use CMD_EVENT_LOAD_STATE_FROM_RAM when RAM sate has data

* Rewrite path_get_state to retroarch_get_current_savestate_path

* Fix unterminated state_path
2021-09-03 18:14:03 +02:00
jdgleaver
743aea1810 Fix cheats when using second instance runahead 2021-09-03 11:27:12 +01:00
Autechre
7b9cbc08d7
Add HDR support for D3D12 (rebased PR from MajorPainTheCactus) (#12917)
* Add HDR support

* Attempt to fix Mingw build and Metal builds

* (D3D12) Fix relative header includes

* Add missing hdr_sm5.hlsl.h

* (d3d12_common.c) Some C89 build fixes

* Fix MSVC build

* - Attempt to fix build on mingw/msys unix with dirty hack
- Fix shader compilation of hdr_sm5.hlsl.h on MSVC/Visual Studio -
the define was seen as an error and was causing the first pipeline
to error out
- Make sure we manually set handle of backBuffer to NULL

* Moving the release of the texture above the freeing of desc.srv_heap
and desc.rtv_heap solves the hard crashes on teardown/setup in RA -
it was crashing hard in d3d12_release_texture before

* Add HAVE_D3D12_HDR ifdef - needs to be disabled for WinRT for now
because of several things that are Windows desktop-specific right now
(GetWindowRect)

* Add dirty GUID hack - should work for both mingw/msys on Windows/Linux
as well as MSVC/Visual Studio (hopefully)

* Change HAVE_D3D12_HDR to HAVE_DXGI_HDR

* Move away from camelcase named variables

* Fix RARCH_ERR logs - they need a newline at the end

* d3d12_check_display_hdr_support - make it return a bool on return
and set d3d12->hdr.support and d3d12->hdr.enable outside of the
function

* (DXGI) Remove D3D12 dependencies from dxgi_check_display_hdr_support and
move it to dxgi_common.c instead

* (DXGI) move d3d12_swapchain_color_space over to dxgi_common.c and
rename it dxgi_swapchain_color_space

* (DXGI) move d3d12_set_hdr_metadata to dxgi_common.c and
rename it dxgi_set_hdr_metadata

* (DXGI) dxgi_check_display_hdr_support - better error handling?

* Fix typo

* Remove video_force_resolution

* (D3D12) Address TODO/FIXME

* (D3D12) Backport
c1b6c0bff2
- Fixed resource transition for present when HDR is off
Fixed cel shader displaying all black as blending was enabled when the hdr shader was being applied - turned off blending during this shader

* Move d3d12_hdr_uniform_t to dxgi_common.h and
rename it dxgi_hdr_uniform_t

* (D3D11) Add HDR support

* Add TODO/FIXME notes

* Cache hdr_enable in video_frame_info_t

* Update comment
2021-09-03 06:15:25 +02:00
jdgleaver
48d9df6bb7 Ensure than menu sounds are re-enabled when calling CMD_EVENT_AUDIO_REINIT 2021-09-01 17:59:46 +01:00
jdgleaver
547f04b894 Fix menu sounds (audio mixing) when using the 'sinc' resampler with quality lower than 'normal' 2021-09-01 15:55:58 +01:00
twinaphex
fb35460c6d Move more code over 2021-08-31 01:47:57 +02:00
twinaphex
5677799faf Move more code over 2021-08-31 01:27:36 +02:00
twinaphex
fc4081cd8f Fix some builds 2021-08-31 00:55:46 +02:00
twinaphex
0db409d5b5 Move lots of menu code over to menu/menu_driver.c - moved at least
44Kb of code over
2021-08-31 00:43:04 +02:00
twinaphex
70ebc85b6c Buildfix for targets with no HAVE_OVERLAY defined 2021-08-30 22:58:53 +02:00
twinaphex
dbf3e278dd menu_driver_toggle - cleanups 2021-08-30 22:31:30 +02:00
twinaphex
03c54a9854 Cleanup menu_event and nested functions so that we remove p_rarch
dependencies
2021-08-30 21:59:35 +02:00
twinaphex
8460618666 menu_input_get_mouse_hw_state - horiz mouse wheel up/down were inverted 2021-08-30 21:17:08 +02:00
twinaphex
c6f2e52d62 Simplify menu_driver_toggle 2021-08-30 21:11:43 +02:00
twinaphex
7e61c7ab32 Optimize menu_input_get_mouse_hw_state 2021-08-30 20:55:27 +02:00
twinaphex
b68ace9e3d Simplify several menu poll functions 2021-08-30 20:46:07 +02:00
twinaphex
e384c2b099 Fix some warnings in retroarch.c - local variables hiding parameter
of the same name, local variable being unused on one platform because
it's only used within an ifdef, etc.
2021-08-30 18:27:55 +02:00
twinaphex
220dfe4dbf Move code in retroarch.c over to configuration file 2021-08-30 16:52:05 +02:00
twinaphex
bfc7e824fe Rmeove some obsolete comments 2021-08-30 16:13:47 +02:00
twinaphex
2f14d2e4e2 Move some command functions over from retroarch.c to command.c - the
other ones have some dependencies on static locals in retroarch.c so
can't be easily transferred over for now
2021-08-30 16:08:50 +02:00
twinaphex
d2283a5237 Use better already existing race guard 'audio_suspended' instead
of 'video_driver_is_switching_mode'
2021-08-30 05:08:09 +02:00
twinaphex
d429ecf304 Safer way of avoiding the race condition in
audio_driver_sample/audio_driver_sample_batch - we can check
is_display_mode_switching to see if we're doing a fs/windowed toggle
(full teardown/setup), no audio should be processed at this point in
time
2021-08-30 04:52:28 +02:00
twinaphex
d45945cda2 When audio driver write callback function fails, don't
turn audio off completely - look if audio_driver_output_samples_conv_buf
is non-NULL first before we attempt to write audio
2021-08-30 02:13:19 +02:00
twinaphex
943e14051c Increased safety for non-batched audio sample callback - fixes audio_driver_sample crashing in PCSX2 when toggling fullscreen 2021-08-30 01:54:49 +02:00
twinaphex
24721e6a1d C89 buildfix for MSVC 2021-08-29 20:37:09 +02:00
twinaphex
0a1affba7a Simplify menu_input_get_mouse_hw_state/menu_input_read_mouse_hw 2021-08-29 19:05:38 +02:00
twinaphex
a9f1dd3647 input_driver_poll; remove shadowed variable
menu_input_read_mouse_hw - cleanup + go through local pointer
variable for primary_joypad
2021-08-29 18:41:58 +02:00
twinaphex
540d192ecb Buildfix for Apple + make sure primary_joypad/secondary_joypad goes through local pointers; cut down on HAVE_MFI ifdefs in retroarch.c 2021-08-29 18:34:52 +02:00
twinaphex
f1f3998d28 Prevent joypad objects being destroyed before their pointers are being
NULLed. Another thread could access a "half destroyed" object before
2021-08-29 18:06:08 +02:00
twinaphex
46fb61bede input_state_wrap - do not attempt to access joypad or sec_joypad
pointers if non-NULL
2021-08-29 16:57:41 +02:00
jdgleaver
bc6fec6e0c Fix overlay input when analog to digital mapping is enabled 2021-08-27 16:16:31 +01:00
jdgleaver
32e2aacd3c Allow 'Custom Aspect Ratio (X Position)/(Y Position)/(Width)/(Height)' to be entered manually via keyboard 2021-08-27 11:21:29 +01:00
twinaphex
7f08729a5e Revert "(gfx_display) Make gfx_display_set_fb_size - get rid of the small"
This reverts commit 618cfacd590ea69d49ee6b73285a9372cc21c56e.
2021-08-26 18:42:43 +02:00
twinaphex
618cfacd59 (gfx_display) Make gfx_display_set_fb_size - get rid of the small
getter/setter functions - also finally take this opportunity to stop
setting framebuffer width/height/pitch for menu drivers that don't
use a framebuffer texture at all
2021-08-26 18:26:44 +02:00
Autechre
c66bcc05cf
Merge pull request #12878 from libretro/input-get-rid-of-getters-setters
Get rid of getters/setters in big driver files from now
2021-08-26 14:58:33 +02:00
twinaphex
597dbfdf9a Address issues pointed out 2021-08-26 14:01:37 +02:00
twinaphex
af6b09d950 Fix some of the indenting; add NULL checks 2021-08-26 13:49:06 +02:00
twinaphex
0194ce91bf Get rid of getters/setters in big driver files from now 2021-08-26 13:27:44 +02:00
jdgleaver
a6901dc85e Add option to (force-)write current core options to disk 2021-08-26 11:42:46 +01:00
twinaphex
df98bca9ae (Mac) Add Discord RPC support - untested 2021-08-25 09:56:00 +02:00
twinaphex
d401816f41 Silence warnings 2021-08-24 18:47:29 +02:00