Commit Graph

4006 Commits

Author SHA1 Message Date
twinaphex c5688729c2 Move has_set_libretro_device to runloop_state 2021-10-29 18:24:19 +02:00
twinaphex 5477e34815 Move stray globals subsystem_data and subsystem_current_count to
runloop_state
2021-10-29 17:41:31 +02:00
twinaphex bf8cae10a3 Move retroarch_get_shader_preset to video_shader_parse.c 2021-10-29 16:35:50 +02:00
Autechre e42f8228de
Move cli_shader to video_state (#13168)
* Move cli_shader to video_state

* Formatting fixes
2021-10-29 15:35:43 +02:00
twinaphex ec7b7821fa Move code out of retroarch.c 2021-10-29 14:13:16 +02:00
twinaphex 18707da360 Move menu_driver_ctl to menu_driver.c 2021-10-29 13:31:10 +02:00
twinaphex 80e7e1adde Move state over 2021-10-28 06:03:54 +02:00
jdgleaver c67c7c944d
Initialise 'Explore' menu on a background thread (#13162) 2021-10-27 17:51:22 +02:00
Autechre 514534f99b
Move more state to runloop_state (#13124)
* Move more state to runloop state

* remove unused variable

* Cleanup

* Move more state to runloop_state

* Remove unused variable

* Cleanups

* move input_remapping functions over to input_driver.c

* Some buildfixes
2021-10-18 15:23:22 +02:00
Nathan Strong c0719e737b build fix 2021-10-17 00:25:01 -07:00
Nathan Strong 5b4b766459 Fix wiimotes regression
== DETAILS
- only call disconnect when we're actually disconnecting a remote
  (e.g. read errors or remote goes to sleep).
- clean up some compile warnings introduced by others (mainly
  unused variables)
2021-10-16 23:56:15 -07:00
Autechre f86c28afac
Merge pull request #13120 from libretro/move-runloop2
move more state to runloop_state
2021-10-15 16:43:44 +02:00
twinaphex 9184d0e114 Move hid_data to input_st 2021-10-15 16:31:31 +02:00
twinaphex 5c6d92bb95 move more state to runloop_state 2021-10-15 16:13:21 +02:00
twinaphex b200ced199 Buildfix for --have-menu 2021-10-15 14:43:25 +02:00
twinaphex 9b4636ff62 Fixes --disable-menu 2021-10-15 14:32:07 +02:00
twinaphex af40baa04d Address feedback 2021-10-15 13:54:04 +02:00
twinaphex a291323467 Move some code to gfx/video_driver.c 2021-10-15 02:25:12 +02:00
twinaphex 40aa7dad10 Move code to menu_driver.c and rename retroarch_ function to runloop_
function
2021-10-15 02:14:43 +02:00
twinaphex 6f7b5a3f15 Buildfix for non-HAVE_DYNAMIC 2021-10-15 00:23:40 +02:00
twinaphex 70b337782d Fix MSVC build 2021-10-15 00:11:52 +02:00
twinaphex b9500ff729 Move state over to runloop state 2021-10-14 22:18:14 +02:00
twinaphex 5e8b2bfed1 Move variables to runloop state 2021-10-14 22:02:09 +02:00
twinaphex ba19dc3140 Move more related to core to runloop_state 2021-10-14 21:47:35 +02:00
twinaphex bf2c3902d4 Cleanups 2021-10-14 21:35:38 +02:00
twinaphex 2b41173cd5 Move more state to runloop_state 2021-10-14 21:22:07 +02:00
twinaphex 6d6ed11b60 remove unused p_rarch variables 2021-10-14 21:18:53 +02:00
twinaphex eef9668263 move runloop state from retroarch_data to runloop_state 2021-10-14 21:15:11 +02:00
jdgleaver 40925baacd Enable SRAM for contentless cores 2021-10-14 13:59:23 +01:00
twinaphex c19b04e21e Cleanup emscripten_mainloop 2021-10-13 23:15:14 +02:00
twinaphex b5e7957260 Fix emscripten 2021-10-13 23:14:26 +02:00
twinaphex c098a321b4 silence more warnings 2021-10-13 20:27:31 +02:00
twinaphex a79bd56018 (WiiU) Prevent implicit declarations 2021-10-13 20:22:01 +02:00
twinaphex 22d70a64dd Move command_write_memory and command_read_memory to command.c 2021-10-13 18:15:35 +02:00
twinaphex 753a04c9c1 Move menu_driver_toggle to menu_driver.c 2021-10-13 17:59:45 +02:00
twinaphex 68f0e50a2f rename a bunch of functions to runloop_ prefix instead of retroarch_ -
we need to make a better distinction between runloop and the 'retroarch
state'
2021-10-13 17:48:40 +02:00
twinaphex 0b66c81197 Move state variables to runloop_state 2021-10-13 17:37:24 +02:00
twinaphex e72a88a98e Move some variables to widget state 2021-10-13 17:25:31 +02:00
twinaphex d87e0c1744 * Fix implicit declaration
* Move more code to gfx/video_driver.c
2021-10-13 16:36:38 +02:00
twinaphex e47e9968ed Move audio_driver_menu_sample to audio_driver.c and turn
audio_driver_flush into static function
2021-10-13 16:29:41 +02:00
twinaphex f070da6dfc Move code to menu_driver.c and input_driver.c 2021-10-13 15:40:01 +02:00
twinaphex 99b09ce359 Move more code to gfx/video_driver.c 2021-10-13 15:20:09 +02:00
twinaphex 5f4d4fe678 Move more code from retroarch.c to video_driver.c - retroarch.c now
778kb
2021-10-13 15:15:24 +02:00
Autechre 0a888f7868
Move video state to gfx/video_driver.c - reduces filesize of retroarch.c to 809kb (#13104)
* Move video state to gfx/video_driver.c - reduces filesize of retroarch.c
to 809Kb
2021-10-13 14:56:22 +02:00
twinaphex e9d4fcc00c Buildfix 2021-10-11 18:06:25 +02:00
Bernhard Schelling a3d9201581
Add environment callback to get the rate retro_run is called (#13022)
* Add GET_THROTTLE_STATE environment callback

* Add RETRO_THROTTLE_UNBLOCKED
to report the case where neither vsync nor audio is limiting the call rate.
Also fix reporting of some special cases when the menu is open.

* Change throttle state mode to unsigned
Use #defines Instead of the untyped C enum to allow easier future additions.

* Spelling fixes

* Avoid any divide-by-zero
2021-10-11 18:05:13 +02:00
Autechre e7f182811a
Split up audio code into new file audio/audio_driver.c (#13097)
* Split up audio code into new file audio/audio_driver.c

* Fix build issues #1

* Small cleanup

* Fix typo
2021-10-11 18:01:37 +02:00
twinaphex 3d710db798 input_state_wrapper symbol name was causing collisions with certain
cores on statically linked platforms
2021-10-08 12:50:45 +02:00
jdgleaver 534f8da487 Add enviroment callback to enable cores to notify the frontend that a core option value has changed 2021-10-06 16:45:14 +01:00
twinaphex 682d45379c Buildfix 2021-10-06 06:03:33 +02:00
twinaphex 61ee2274e6 Move more code over to input_driver.c - BSV code in particular but
also input state function callbacks - retroarch.c code size reduced
to 874Kb
2021-10-06 05:57:39 +02:00
Autechre f242ef6a7c
Merge pull request #13073 from gblues/gblues/wiiu-unified-hid
Gblues/wiiu unified hid
2021-10-06 02:25:08 +02:00
twinaphex f4734d223c Another buildfix 2021-10-05 22:57:49 +02:00
twinaphex 376b7a622c Fix NGC/Wii builds 2021-10-05 22:18:08 +02:00
Nathan Strong e02e345a28 Make GCA driver compatible with other HID drivers
== DETAILS
Use a little trickery to ensure the GCA driver continues working
with other HID implementation.

I've expanded the joypad implementation to support multi-pad devices.
However, this requires changes to each HID implementation to actually
function.

I've made the necessary changes for WIIU, but I don't have the means
of making the change in the other HID implementations.

So, I've built in a backwards-compatibilty mode for the driver.

The trick is to have an identifier byte at the top of both data structs
that the driver returns. We can then use that byte to determine which
of the structs has been passed to the pad functions and act accordingly.

In the GCA case, for non-wiiu platforms, it will simply expose port 1
of the GCA and the other 3 ports do nothing.
2021-10-05 09:47:03 -07:00
Nathan Strong 5da1cd08ff Unify the HID driver architecture
== DETAILS
When I first implemented the Wii U HID architecture, I ended up
having to design my own implementation because, at the time, I did
not have a way to read the HID device string to allow the existing
code to successfully detect the gamepad.

After spending some time experimenting, I've figured out how to
do this. And that means I can better align the HID driver with other
platforms.

change summary:

- create a single state structure for all three sub-types of wiiu pads
  (kpad, wpad, and hid)
- eliminate confusing duplicate pad lists
- eliminate confusing duplicate HID pad drivers (ds3, gamecube
  adapter, etc)
- ensure the ds3 driver still works
2021-10-05 09:23:08 -07:00
Francisco Javier Trujillo Mata 9f96723dd0 Adding proper translations for changing resolution 2021-10-04 23:53:55 +02:00
Francisco Javier Trujillo Mata 3bbfcf7b39 Adding to get_video_output_size 2 parameters for additional info 2021-10-04 23:53:55 +02:00
Francisco Javier Trujillo Mata 216675919b Add PS2 Support for changing resolution and offset 2021-10-04 23:53:55 +02:00
Autechre 8807e2957e
Input refactors pt3 (#13053)
* Move more internal state over to input_driver.c and menu_driver.c -
retroarch.c now down to 893kb
- Remove now unused p_rarch pointers in functions
2021-10-01 07:18:30 +02:00
twinaphex e9a4e811ac Move more code and variables from rarch_state out to input_driver
and menu_driver
2021-10-01 00:41:50 +02:00
twinaphex 49fbed2423 Get rid of input_mouse_grabbed - move retroarch types to
retroarch_types.h
2021-09-30 23:22:50 +02:00
twinaphex 878ad88e5b Buildfix 2021-09-30 21:34:36 +02:00
twinaphex dbe414e1e1 move input_poll_overlay to input_driver.c 2021-09-30 21:29:35 +02:00
twinaphex ef875f6102 Create input_state_get_ptr - move to input_driver.c -
also moved over the functions that had a dependence on this
state - retroarch.c reduced to 979kb now
2021-09-30 20:54:56 +02:00
twinaphex e13073c411 move gfx_thumb_state to gfx_thumbnail.c 2021-09-30 18:05:00 +02:00
twinaphex b1410c72e5 - Move disp_get_ptr to gfx_display.c
- Move menu_driver_init to menu_driver.c, and turn
menu_driver_init_internal into static function
2021-09-30 17:14:26 +02:00
twinaphex 5ba8843354 Move dispwidget_get_ptr over to gfx_widgets.c 2021-09-30 04:40:15 +02:00
twinaphex 0364a277e4 Fix function declaration 2021-09-28 15:22:33 +02:00
twinaphex 4c419466e6 Cleanups 2021-09-28 15:19:08 +02:00
twinaphex 9bb2359a86 More naming consistency changes - take 'retroarch_' prefix out of
functions that don't touch p_rarch state
2021-09-28 13:48:49 +02:00
twinaphex f90809d754 Move data out of retroarch_data.h and into retroarch.c 2021-09-28 13:02:14 +02:00
twinaphex e886e908d5 Create consistent naming conventions - use retroarch_ instead
of rarch_ for some functions for all functions coming from retroarch.h
2021-09-28 12:56:10 +02:00
twinaphex e4bec6739c Move code over to menu_driver.c 2021-09-28 12:07:29 +02:00
twinaphex e31fbb8048 Move menu_driver_alive to menu_state 2021-09-28 10:11:13 +02:00
twinaphex 1e29ba3cd6 Move menu_driver_is_binding to menu_state 2021-09-28 09:52:46 +02:00
twinaphex 9e26012751 Move menu_driver_init_internal to menu_driver.c 2021-09-28 09:32:11 +02:00
twinaphex 9727be4de6 Cleanup 2021-09-28 04:03:15 +02:00
twinaphex 774dccca7c Move more code over to gfx/video_driver.c 2021-09-28 02:15:11 +02:00
twinaphex 3dee62ce62 Cleanups and buildfix 2021-09-28 01:16:53 +02:00
twinaphex 05e4aa8bfb move more code over to gfx/video_driver.c 2021-09-28 00:50:48 +02:00
twinaphex 4574a58683 (video_driver.c) Move some code over 2021-09-27 20:31:31 +02:00
twinaphex 0448afab96 Move video driver functions over to gfx/video_driver.c 2021-09-27 19:37:22 +02:00
twinaphex c3afd4b1a5 Buildfix for Emscripten 2021-09-26 23:07:51 +02:00
twinaphex 4b5951bda3 Rename gl_common.h to gl2_common.h and remove some file dependencies
on it
2021-09-26 17:42:12 +02:00
twinaphex ee97c2066a Make sure this is no longer a function behind a ifdef - too much
maintenance chores
2021-09-26 02:47:43 +02:00
twinaphex 89968333a4 Attempt to fix Mac build 2021-09-26 02:38:57 +02:00
Nathan Strong fb86ca6e33 Fix the snprintf warnings for everyone this time
== DETAILS
So, basically this back-and-forth is because we used fixed-size
data types (i.e. `uint32_t`) which maps to different primitive data
types on different platforms. So `uint32_t` might be a `long` on some
platforms (e.g. Wii U), while it's just a plain integer on others (PC).
And the format specifier works off primitive data type, not data type
size.

So, to resolve this, we:

- keep `%lx` as the format specifier
- cast the parameter to printf to unsigned long

This is better than the alternatives that could cause problems trying to
cast a long down to an int.
2021-09-25 15:08:34 -07:00
Nathan Strong 9b2d4236ad WIIU: Clean up a bunch of compiler warnings
== DETAILS
These changes fall into a few broad categories:

1. Explicitly undefine things we want to re-define due to conflicts with
   the version of devkitpro we're using
2. Clean up hex format specifiers to use `%lx` or `%lX` when working with
   long integers
3. Move variables inside the ifdef they're used in to squelch "unused variable"
   messages
4. Add parenthesis to make Wii U shader declarations stop complaining

And then there's a weird "misleading indent" warning that I fixed by just
rewriting a block of code to use a switch statement instead of if-then-else.

These changes work fine on Wii U, but we'll need to keep an eye on CI/CD to see
if other platform builds break.
2021-09-25 13:25:39 -07:00
Ben Hamilton (Ben Gertzfield) 1970786932
New feature: Use gamepad combo to quit Retroarch (#13017)
* Refactor menu toggle combo button logic to allow quit combo button

* Quit gamepad combo

* Fixes from @jdgleaver
2021-09-24 18:30:46 +02:00
twinaphex 6eeebeab25 Get rid of gfx_display_set_msg_force 2021-09-21 21:10:38 +02:00
twinaphex 83ce4259a0 Have only one getter for runloop_state 2021-09-21 19:08:26 +02:00
twinaphex 550d3fa766 Create new header runloop.h 2021-09-21 18:38:53 +02:00
twinaphex f21641d898 Get rid of another 'getter' function 2021-09-21 18:30:56 +02:00
twinaphex 1b7dea7e8e Move code over to menu_driver.c 2021-09-21 18:14:01 +02:00
twinaphex c42f932c3f Moved code over to menu_driver.c 2021-09-21 18:04:48 +02:00
twinaphex f11f892076 Put retroarch_apply_shader_preset behind ifdef 2021-09-21 17:31:51 +02:00
twinaphex 7c8c53fb2d Get rid of menu_driver_get_ptr - we are going to be using only one
getter for each component state instead of several getters
2021-09-21 07:14:27 +02:00
twinaphex 44012ace47 move more menu state over to menu_driver.c 2021-09-21 06:05:25 +02:00
twinaphex 28e0b669d2 (menu) move more state over 2021-09-21 05:44:53 +02:00
twinaphex 58bc88d433 Move menu_driver_state over to menu_driver.c and move it out of
p_rarch
2021-09-21 05:33:46 +02:00
twinaphex 30353ac8f2 move more code out of retroarch.c/retroarch_data.h and into
menu_driver.c
2021-09-21 05:11:39 +02:00
twinaphex d68a138250 Move more menu state to menu_state_t - and move code from
retroarch.c to menu_driver.c
2021-09-21 04:51:38 +02:00
twinaphex c4b8fab0d0 Move menu_input_state to menu_state 2021-09-21 04:20:04 +02:00
twinaphex f3b2e233bb Move more code to menu_driver.c 2021-09-21 00:51:15 +02:00
twinaphex abebf4a421 Cleanups 2021-09-21 00:41:52 +02:00
twinaphex ec55f8188a Move code out of retroarch.c and into menu/menu_driver.c 2021-09-21 00:12:26 +02:00
twinaphex e2e236f1bf Create menu_state_get_ptr() 2021-09-21 00:00:50 +02:00
twinaphex 94b5769375 Cleanups 2021-09-20 21:21:54 +02:00
twinaphex d2af43d457 Cleanups 2021-09-20 21:08:53 +02:00
twinaphex fabdede667 Move anim_get_ptr to gfx_animation.c 2021-09-20 20:17:53 +02:00
Autechre cbfa8d6400
Move coreinfo_get_ptr internal state back to core_info.c (#13020) 2021-09-20 15:43:27 +02:00
twinaphex 9b5a60af53 Move location driver code to separate file 2021-09-20 06:26:14 +02:00
twinaphex 238eb649a2 Split up midi_driver code to midi_driver.c 2021-09-20 03:43:37 +02:00
twinaphex b3d724b7a3 Move code out of retroarch.c 2021-09-18 22:05:03 +02:00
twinaphex eb895f9947 move more code out of retroarch.c 2021-09-18 21:14:15 +02:00
twinaphex 1c546cb7fd move more code out of retroarch.c 2021-09-18 21:03:16 +02:00
twinaphex db3f0a8468 Move code out of retroarch.c - move it into
network/netplay/netplay_frontend.c
2021-09-18 06:15:02 +02:00
twinaphex 7c74e035b0 Small cleanups 2021-09-18 06:15:02 +02:00
Autechre 62a66ff0e5
Prevent crash pointed out by LIJI - primary_joypad can be NULL (#13002) 2021-09-17 05:20:09 +02:00
twinaphex 3c69a941da Move code over to input_driver.c 2021-09-13 18:33:53 +02:00
twinaphex 2b08ebb677 Cleanups 2021-09-13 18:09:44 +02:00
MajorPainTheCactus 3c6bdfd0d8
Fixed numerous issues with HDR (#12979)
* Fix for warning and fix for incorrect comment

* Fixed contrast to be more correct - now scales from 0-10 linearly and behaves more the way you'd expect it to - changed name to ditch legacy settings users may have
Added ability to skip inverse tonemapper to the shader via the constant buffer using 'inverse_tonemap' - set to 0.0f to skip
Fixed potential bug when swapping between hdr and sdr and the bit depth not being set correctly
Fixed dx11's blend, rasterizer and topology states not being set to the sames when using hdr and leaving the menu - caused issues with PCSX2's Shadow of the Colossus
Added numerous helper functions to help create the correct values to colour the UI - normally the white UI elements should be rendered at paper white not max brightness for various reasons

* Fix stylistic issues - * Don't use camelcase for variables and function names * Use '(void)' for function declarations instead of () in C code * Declare variables at the top of a function or code block * Make sure functions that return a value always have a default return path that is not encapsulated by an else block * Use more unique names for retro_math functions which are less likely to overlap with other libraries' function symbols

Co-authored-by: twinaphex <libretro@gmail.com>
2021-09-13 16:54:50 +02:00
twinaphex ad4b51b903 Move cde from retroarch.c to input_driver.c 2021-09-12 19:27:12 +02:00
twinaphex b5138b6122 Move input_config_get_bind_string to input_driver.c 2021-09-12 17:41:00 +02:00
twinaphex ad39b1d115 Simplify osk_update_last_codepoint() 2021-09-12 17:36:22 +02:00
twinaphex 26b9439dbc C89_BUILD buildfix 2021-09-12 16:50:46 +02:00
Autechre cfcd0a7a0d
Merge pull request #12795 from sonninnos/video-rate-switch
Automatic PAL/NTSC refresh rate switch where available
2021-09-12 16:15:04 +02:00
twinaphex 1b8d68c6e4 Another buildfix 2021-09-11 18:36:12 +02:00
twinaphex c4cbcb2ff4 Add ifdef around this 2021-09-11 18:22:07 +02:00
twinaphex 2490f6e215 Move code from retroarch.c to video_shader_parse.c 2021-09-11 18:15:35 +02:00
twinaphex c75bb549e5 Move another function over to menu_driver.c 2021-09-09 17:26:59 +02:00
twinaphex 4830150d22 Move function out of retroarch.c and into menu_driver.c 2021-09-09 17:21:48 +02:00
twinaphex 8564b4f8e3 Fix compilation problem when HAVE_BSV_MOVIE is not defined 2021-09-09 16:58:52 +02:00
twinaphex 6a310ecfed Move more code to command.c 2021-09-09 16:55:14 +02:00
twinaphex 14cd338b97 Move code from retroarch.c to command.c 2021-09-09 16:31:35 +02:00
twinaphex 9b8145f05d Cleanups 2021-09-09 16:06:57 +02:00
twinaphex a11b1c3b72 (retroarch.c) Cleanups 2021-09-09 16:01:33 +02:00
twinaphex 772282eeec Move menu shader code over to menu_driver.c 2021-09-09 15:33:17 +02:00
twinaphex 28389d30e8 Move some code from retroarch.c over to menu_driver.c 2021-09-09 15:22:12 +02:00
twinaphex 6c79cebc6e Move input_overlay_auto_rotate_ out of retroarch.c and into
input_driver.c
2021-09-09 14:24:42 +02:00
twinaphex 81e7dab159 Move code out of retroarch.c and into input_driver.c 2021-09-09 14:11:46 +02:00
Michael Burgardt 303d17e2e6 Rebase 'Add generic rumble gain to input settings' by davidgfnet 2021-09-08 19:52:32 +02:00
Jamiras 8a31b732dd
disable slowmotion when enabling hardcore mode (#12958) 2021-09-08 18:57:19 +02:00
bulzipke 8018be5c9b
Fix ram states to file when core deinit (#12956)
* Fix ram states to file when core deinit

* Fix unterminated state_path
Call CMD_EVENT_RAM_STATE_TO_FILE when CMD_EVENT_UNLOAD_CORE too
2021-09-08 18:01:07 +02:00
twinaphex c9e587a5a7 Move more input code over to input_driver.c from retroarch.c 2021-09-07 14:55:37 +02:00
twinaphex ccbbf45760 retroarch.c - cleanups 2021-09-07 13:55:42 +02:00
twinaphex 276b4fd72c Move more code over from retroarch.c to input_driver.c 2021-09-07 13:08:31 +02:00
twinaphex 67defbcf26 Transfer code over from retroarch.c to input_driver.c 2021-09-07 12:42:03 +02:00
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 618cfacd59.
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
Autechre dbb74ba5ab
Merge pull request #12823 from markwkidd/input-drivers
input_driver refactor
2021-08-24 18:45:20 +02:00
sonninnos 8d513f8199 Print video-prefix in refresh rate set to log only 2021-08-23 18:32:10 +03:00
sonninnos b8188baeaf Automatic refresh rate switch where available 2021-08-21 01:15:41 +03:00
twinaphex eb50d7dbb4 (UWP) Push temporary fixes for issue that happens when resizing on UWP
with latest Xbox Series dashboard; DXGIResizeBuffers passing 0, 0 as
width/height is apparently problematic as it changes 0, 0 to 8,8
instead,
breaking the program
2021-08-20 23:16:01 +02:00
Mark W. Kidd 5f834a8cb3 input_driver refactor 2021-08-19 20:02:39 -04:00
jdgleaver bbc121cd74 Fix RETRO_ENVIRONMENT_SET_FASTFORWARDING_OVERRIDE callback when runahead is enabled 2021-08-19 14:49:49 +01:00
Autechre ae327a769b
Revert "input refactoring: create input_driver.c" 2021-08-18 18:45:53 +02:00
Autechre a66b1b3e48
Merge pull request #12703 from markwkidd/input-drivers
input refactoring: create input_driver.c
2021-08-18 18:17:43 +02:00
Autechre 80136dd3ec
Merge pull request #12663 from Nargash/log_early
Starting logging and verbose mode before first config load
2021-08-18 18:17:03 +02:00
jdgleaver 0e98b4ddea Add environment callback for enabling core option menu visibility updates without toggling Quick Menu 2021-08-18 16:08:26 +01:00
Mark W. Kidd 5a8920c862 input_driver refactor 2021-08-17 08:56:29 -04:00
jdgleaver fa7dd0f6d9 Add facility to cap maximum window size in windowed mode 2021-08-16 17:49:11 +01:00
jdgleaver 0f142d531a Revert "Add extra video logs so we can see what goes on"
This reverts commit 6780f58444.
2021-08-16 17:49:11 +01:00
jdgleaver 6e7e8a7680 Revert "video_driver_init_internal - add more logs"
This reverts commit d0a08ce959.
2021-08-16 17:49:11 +01:00
jdgleaver c2b3ba907c Revert "video_driver_init_internal - refactor"
This reverts commit bba924e8d2.
2021-08-16 17:49:11 +01:00
twinaphex bba924e8d2 video_driver_init_internal - refactor 2021-08-15 21:57:44 +02:00
twinaphex d0a08ce959 video_driver_init_internal - add more logs 2021-08-14 08:36:47 +02:00
twinaphex 6780f58444 Add extra video logs so we can see what goes on 2021-08-14 08:11:17 +02:00
jdgleaver c4880ca840 Add option to disable core option categories 2021-08-13 16:18:02 +01:00
twinaphex 5b3942eae7 * (PSP/Vita) Remove unused variables
* (Switch/libnx) remove dead code
* (Lakka/Switch/libnx) It was a mistake to include
  switch_performance_profiles.h inside lakka.h, it was creating warnings
for nearly every file. Instead, it gets optionally included for the
files that need it
2021-08-12 18:51:33 +02:00
twinaphex d28402b87d Current label and value seems too big for strings being spoken,
reduce them by half
2021-08-12 18:24:35 +02:00
twinaphex ccb8ecec4d Simplify command_event_save_current_config 2021-08-12 18:16:50 +02:00
Twinaphex 57054a075d (macOS) Fix remaining build errors with netplay discovery ifdefs 2021-08-12 17:11:31 +02:00
twinaphex 20ef0667b0 Add initial webOS port courtesy of informatic/webosbrew/mariotaku 2021-08-11 20:04:11 +02:00
Autechre ef3dbc8378
Merge pull request #12749 from jdgleaver/core-option-category
Add core option category support
2021-08-09 14:19:00 +02:00
twinaphex 93e5fc60af Silence some warnings 2021-08-08 22:14:50 +02:00
jdgleaver fe1f311a35 Add core option category support 2021-08-06 15:33:47 +01:00
sonninnos bd3533f05d Friendly names for mice where available 2021-08-06 00:21:17 +03:00
Nargash c844705665 Enable verbosity and logging before initial config file load 2021-08-02 20:31:48 -05:00
twinaphex 9dd06996c5 Skip state_manager_event_{deinit/init} when core type is dummy 2021-08-01 22:31:44 +02:00
Autechre b4ccf23701
Merge pull request #12708 from sonninnos/auto-mouse-grab
'Automatic Mouse Grab' option
2021-07-30 13:44:01 +02:00
sonninnos 149beaf061 'Automatic Mouse Grab' option 2021-07-29 02:16:43 +03:00
Autechre 910d729d50
Merge pull request #12661 from markwkidd/menu-input
consolidate menu_input.h declarations
2021-07-29 01:14:06 +02:00
jdgleaver d2f8af553d Ensure that config overrides and remaps are unloaded upon core initialisation failure and when core calls RETRO_ENVIRONMENT_SHUTDOWN 2021-07-26 16:14:35 +01:00
Mark W. Kidd e3d2a9b614 Merge branch 'master' of http://github.com/markwkidd/retroarch into menu-input 2021-07-23 10:27:49 -04:00
twinaphex edd9ed3619 Fix some style nits 2021-07-20 05:13:52 +02:00
jdgleaver e306dd8eeb Automatically disable core info cache when core info directory is read-only 2021-07-19 16:39:18 +01:00
gouchi fcefefaeab intl: Add missing languages for the first startup 2021-07-18 22:40:01 +02:00
Mark W. Kidd 64672b4b63 consolidate menu_input.h declarations 2021-07-15 14:19:38 -04:00
CrystalCT 89b46bc246 First basic RSX driver for PSL1GHT 2021-07-12 09:35:44 +02:00
sonninnos c10bac6558 AV_INFO logging details 2021-07-09 16:06:56 +03:00
Autechre ed3412c004
Merge pull request #12618 from markwkidd/input-remapping
consolidate and comment input_remapping.h
2021-07-08 14:22:51 +02:00
Autechre 7d9d57dc50
Merge pull request #12564 from sonninnos/integer-overscale
Integer overscale option
2021-07-08 12:03:28 +02:00
HyperspaceMadness d14c4d2883 Added Aspect Ratio Full
Fixes

Fixes

Moved ASPECT_RATIO_FULL to end of list, added TODO

Fixed Full Order

Fixed UI Visibility
2021-07-07 09:37:36 -04:00
Mark W. Kidd b17dd28ff2 consolidate and comment input_remapping.h 2021-07-06 16:13:43 -04:00
Mark W. Kidd b0831bf1a0 comment documentation for input_driver.h 2021-06-29 20:12:44 -04:00
sonninnos b483f233d2 Integer overscale option 2021-06-24 00:56:52 +03:00
jdgleaver 3a82cf980d 'Analog to Digital Type' usability improvements 2021-06-23 14:28:45 +01:00
twinaphex 0e1d5ba30e Silence some warnings; cleanup 2021-06-21 21:15:03 +02:00
jdgleaver 973f5cda6d Add support for mapping multiple controllers to a single input device 2021-06-21 12:42:38 +01:00
jdgleaver 3c2e3f1ce9
Add enhanced search functionality to the 'Manage Cores' menu (#12516) 2021-06-11 21:17:32 +02:00
Bernhard Schelling 98194ce135
Allow the 8 analog stick directions to be used as keys for core keyboard mappings (#12506) 2021-06-10 17:00:33 +02:00
jdgleaver adfabcb742
Fix '--disable-crtswitchres' configure option (#12500) 2021-06-07 17:39:18 +02:00
Ben 4b2f27eff8 Ver 0.9.2 SR2 (Switchres API) Implimantation
Fixed SR close match refresh bug.
Added menu high resolution option.
Fixed desktop restore bug cuusing endless resolution change requests.
Fixed file conflicts
Added destop restore resolution back in for manu only.
Pulled Switchres fixes.
Added better PI rsolution support.

Ver 0.7 SR2 (Switchres API) Implimantation

Removed HH experimetal check. This is better done via teh switchres.ini at present.
Fixed refresh rate bug. Now new resolution and refesh is added correctly.
Removed SR deinit from menu restore. Meanu now stays at last content resolution.

Ver 0.6.2 SR2 (Switchres API) Implimantation

Fixed super resolution bug casuing abnormal video size and aspect ratio
Fixed logging issue casuing seg falts on RA exit

Ver 0.6 SR2 (Switchres API) Implimantation

Ver 0.2 SR2 (Switchres API) Implimantation

Added forced super resolutions.
Added Multi-monitor/monitor selection support.
Added desktop resolution restore when switching back to menu only.
Added new menu items for 31KHz standard and 120hz monitor profiles.
Added new menu item INI. load monitor profile from switchrss.ini.
Fixed winraw driver. Coordinates new refreshed after a resolution change.
Fixed Menu aspect ratio in super resolutions.
Removed static glabals. These have been added to videocrt_switch struct.

Ver 0.1 SR2 (Switchres API) Implimantation

Removed old CRTSwitchRes method. Added new SR2 API implimantaion.
Resolution swithcing is now done by switchres libs. Both Linux and Windows
working with native and super resolutions. Working multi-monitor support
with monitor index selection. Working 31KHz support with standard and 120Hxz
modes. The monitor index selection is still done via the RA UI. Only choose
native and 15KHz form the CRT options in the RA UI as all options are now set
in the switchres.ini. All other CRT optoins in the RA UI currently do nothing.

Added SR wrapper to fix compile issues. Added back RPi functionality

Fixed windows resize/scaling issues on resolution change

Thanks @Calamity no more need for crt_switch_driver_refresh()

Fix broken case after prevous commit

Monitor preset options 15/31KHz now active. Added new meu option.

Moitor persets can now be choosen fom the RA UI. 15KHz and 31KHz will set
arcade_15 and aracde_31 respectivly. New option INI, if this is chosen your
monitor preset will be selected from your switchres.ini file.

Added 3KHhz, 120Hz. for old RA users. Renamed 31KHz to 31 KHz,  Standard

Fixed winraw input coordinates after switching resolution.

Code cleanup

Fixed menu aspect ratio issue

Added menu resolution restore after closing content

Fixed aspect ratio after menu resolution restore.

code clean up

Fxed menu Resulition Restore Aspect Ratio. When SR uses non integer scalled resolution.

super width bug with restoring menu resolution fix

added super resolution check after setting desktop resolutoion variables

when menu active only sr_deinit() used to restore desktop mode.

Fixed menu sr_deinit bug. now setting sr_active false

Removed static globals, added them to video_switch struct

Fixex compile bug due to comment //

Fixed compile issues doe to c++ comments in teh switchres_wrapper.h

Temporarily removed SR2 logging to fix compile isses for c90

added logging back in. Removed support for winnt and osx

Added define for C89. Disabled SR if defined C89

Removed all RA compile fixes fro C89 C90 etc. Swithing now working again.

Put Switchres behind HAVE_SR2. HAVE_SR2=no by default. --enable-sr2

Ver 0.5 SR2 Implimentation.

Ver 0.4 SR2 Implimantation.

Bake SR inside RA

Removed temporary log files

Disable switchres when C89/C99 builds.

Removed C89 and C90 checks for SR

Fixed switchres_wrapper.h location

Ver 0.3 SR2 Implimenation

Dissable logging for C89 __STDC__

Fix For RPi

fixed missing EOL

fixed RPi function definition

added vidrocrt_switch stuct to RPI funcion

fixed xoffset for RPi

Removed old RPi function call

SR disabled for videocore until VC4 switching ported

Reverted back to state 5c8a56c Bake SR inside RA

Use native win32 api for threads.

Fix static lib linking
LIBERROR would be defined twice otherwise + improper function names prefixed by __imp_

Added lidstc++ to makefile.common for switchres

Fixed RPi switching. Disabled Switchres for videocore unill it is ported.

removed RAA.log. Should not exist

Added check for when SR fails to set mode with an aspect ratio fix.

added video driver re init for RPi

GB, GBA and GBC core check, adjusted reseolutions and scale. Please turn on integer scalling in the RA UI

Added logas back in. Checking STDC verstion >= C11

Fixed c89 for loop declaration.

Code clean up. Added new functions

Fix resolution switching bug introduces with HH code clean up.

Fixed menu restore bug on closw content after code clean up

Moved SR logging to relevant RA logs

Update makefile. Checks for X11 and xrandr

fixed makefile

Use native win32 api for threads.

Fix static lib linking
LIBERROR would be defined twice otherwise + improper function names prefixed by __imp_

Update switchres_wrapper.* header comments

Update year copyright

DRMKMS: build only if libdrm has the required version

XRANDR: build only if xrandr is available

Simplified maklefile

Fixed RPI compile error with unsued functions.

As before

Disable Griffin. No switching support available. Never has been

Removed log file 1

Added Win32 static define

Added SR source

Removed Videocore check on destroy SR

Moved SR deinit to trigger earlier on RA exit.

Fixed compile error after upstream rebase

Fixed aspect ration bug cused by super resolutions. Temporarily disbabled SR logging

Re inabled runtim eSR loggind. Disableed all RARCH logging on retro_deinit_drivers

Removed srdeinit from menu restore. Menu stays in current reolution until a fix can be found

Fixed refresh rate changes when no reolution change is detected.

Forgot to add teh resolution cahge in with the refresh change oops

Fixed endless no detection log.

Removed HH check. This can been better adjusted using the switchres.ini

fixed compile issue

Added better PI crt switching and fixed typo

Pulled Swicthres fixes. Updated desktop restore resolution.

removed unused makefile

Lockec menu refresh to 60hz

fixed missing new line

Fixed file conflicts

Forced 640x480@60 for menu

Added high resolution menu option

Removed item logg checker

Fixed typos

Removed unused functions

Fixed SR close match refesh bug.

Fixed typo
2021-06-04 08:32:56 -07:00
Autechre 140b8f5e0a
Merge pull request #12474 from Jamiras/cheevos_menu
(cheevos) group achievements by category in quick menu
2021-06-03 19:42:09 +02:00
Jamiras cd8f6ede4e support for almost there, active challenge, and recently unlocked categories 2021-06-01 19:38:10 -06:00
Jamiras e76265e1aa group achievements by category 2021-06-01 15:23:18 -06:00
jdgleaver 55c855267e Add API extension for setting 'need_fullpath' based on content file extension and to request persistent frontend content data buffers 2021-06-01 15:28:39 +01:00
Jamiras 2c21e3df8b
(cheevos) upgrade to rcheevos 10.0 (#12442)
* update rcheevos to v10.0.0

* changes for rcheevos 10

* map virtual tracks in cd_open_track_handler

* address travis warnings
2021-05-27 21:01:00 +02:00
twinaphex 0dfb2b57fb use snprintf instead of multiple consecutive strlcpy/strlcats 2021-05-26 05:22:18 +02:00
twinaphex a84c9022af Cleanups 2021-05-25 21:31:39 +02:00
twinaphex 0a5d4288f5 Rollback runloop changes - will require a rethink in how we approach
this
2021-05-25 20:41:39 +02:00
jdgleaver 466bd3be7f Add option to select between 'touched' elements and physical controller inputs when showing inputs on overlays 2021-05-25 18:01:52 +01:00
twinaphex f70b6fbf58 Revert "Go through p_runloop pointer"
This reverts commit 30a90adc47.
2021-05-25 05:27:06 +02:00
twinaphex 30a90adc47 Go through p_runloop pointer 2021-05-25 05:19:43 +02:00
twinaphex 621a0b61f6 Move more state to runloop_state (in preparation of removing path_clear
and path_is_empty)
2021-05-24 20:38:56 +02:00
twinaphex 244a2ad052 Simplify video_thread_get_ptr - get rid of unused p_rarch pointer
in dir_free_shader
2021-05-24 19:22:55 +02:00
twinaphex 2b4f2525d0 move more runloop functions over to runloop.c 2021-05-24 02:57:40 +02:00
twinaphex 75175ddbce move more runloop functiosn to runloop.c 2021-05-24 02:27:55 +02:00
twinaphex b48ab663b0 Move BSV runloop code over to runloop.c 2021-05-23 02:20:01 +02:00
twinaphex 364d518726 More runloop_state changes 2021-05-23 01:54:33 +02:00
twinaphex d1c7d97b10 Split up code to runloop.c 2021-05-22 23:09:00 +02:00
twinaphex 7c483340fc Start creating a distinction between runloop_ and retroarch_ prefix
functions
2021-05-22 16:51:55 +02:00
twinaphex 89e4cac3f1 Small cleanups 2021-05-22 07:33:05 +02:00
twinaphex 29e9027ec0 Cleanup find_driver_* functions - don't pass p_rarch through it 2021-05-22 05:37:14 +02:00
twinaphex 68c377cd55 Move more to runloop_state 2021-05-22 02:57:02 +02:00
twinaphex 706ab17b2c Remove p_rarch passing around where it's no longer needed 2021-05-22 02:14:32 +02:00
twinaphex fede9eee4b Get rid of unused variables 2021-05-22 01:31:29 +02:00
twinaphex d84a2ef700 Move boolean state variables from p_rarch to runloop_state 2021-05-22 01:25:59 +02:00
twinaphex 4ba92b1643 Move more runloop state over to runloop_state 2021-05-22 00:25:01 +02:00
twinaphex 57a728fd41 Rename audio_out_rate to audio_output_sample_rate 2021-05-21 22:36:46 +02:00
twinaphex bc8f98358b Cleanup in audio_driver_init_internal 2021-05-21 22:30:16 +02:00
twinaphex 3887db349e Get rid of unused variable 2021-05-21 22:26:46 +02:00
twinaphex 98448960f5 Move audio_driver_mixer_volume_gain to runloop_state struct 2021-05-21 22:25:36 +02:00
twinaphex 22a2b5ac1c Move more variables to runloop_state 2021-05-21 22:20:26 +02:00
twinaphex 458d636861 Move more runloop state to runloop state struct 2021-05-21 21:23:06 +02:00
twinaphex 64c01e620d Rename retroarch_get_runloop_fastforward_* function 2021-05-21 20:09:50 +02:00
twinaphex 57c4802ab4 Remove unused variable 2021-05-21 20:02:22 +02:00
twinaphex 74f1bf59b9 Refactors - plenty of runloop state functions no longer pass p_rarch
around, so get rid of it
2021-05-21 19:52:09 +02:00
jdgleaver d5f862ee07 Prevent duplicate inputs when using remaps with input overlays 2021-05-21 16:31:11 +01:00
twinaphex f66d4ea33c Remove unused variables 2021-05-21 17:14:13 +02:00
twinaphex 0797fd957a menu_entries_get_core_title - cut down on amount of lines of code 2021-05-21 17:10:20 +02:00
twinaphex 30143f15f2 Simplify menu_entries_get_core_title 2021-05-21 16:54:43 +02:00
twinaphex 3b64752f4f Simplify strlcpy/strlcat combinations to single snprintf 2021-05-18 20:01:51 +02:00
twinaphex 0e7ff6ea4e - Avoid some repeated strlcpy/strlcat calls one after another; replace
it with a single snprintf call under the assumption it will probably
still be faster
- In some instances, the first time the string was manipulated on was
with a strlcat call instead of an strlcpy - change this
2021-05-18 19:27:54 +02:00
twinaphex e784cc1aaf Cleanup some accessibiliyt-related code - pre-initialize strings
normally, don't use weird string_is_equal check which checks if string
is empty, etc.
2021-05-18 19:02:10 +02:00
Autechre a04fe66032
Merge pull request #12380 from stenzek/vulkan-software-fb
(video/vulkan) Avoid caching stale mapped GPU texture as frame data
2021-05-18 18:01:47 +02:00
twinaphex 74cef32c1d Cleanups 2021-05-18 00:57:46 +02:00
Autechre ad5b2d614a
Merge pull request #12401 from davidgfnet/br3
Add brightness restore hook
2021-05-17 13:24:50 +02:00
twinaphex e6adca7679 rarch_init_core_options_path - NULL termination of strings is already
done outside by caller
2021-05-17 00:56:29 +02:00
David Guillen Fandos c378665af5 Add brightness restore hook
This is out of the unix frontend driver on purpose, since settings do
not seem to be available at init() time.
2021-05-15 21:20:37 +02:00
jdgleaver 0a24f5f38a Fix 'Auto-Shader Delay' functionality 2021-05-14 13:47:46 +01:00
jdgleaver 484c4ad51e Add API extension for cores to override frontend fast-forward state 2021-05-13 13:16:37 +01:00
jdgleaver 50d27fada9 (Static Platforms) Ensure 'Always Reload Core on Run Content' setting is applied when loading content via the file browser 2021-05-12 10:59:07 +01:00
Autechre 89391ccf9a
Merge pull request #12287 from LazyFunker/master
Some fixes for UWP/XBox
2021-05-12 09:17:53 +02:00
David Guillen Fandos 9280340fe0 CPU governor/frequency part 2
This adds managed policies and settings to store them and reload them at
startup. Only for Lakka builds!
2021-05-12 02:16:25 +02:00
Stenzek 92e795aa28 (main) Remove null check from video_driver_set_cached_frame_ptr
The only call sites here use NULL as a parameter, and it makes
sense to clear it, since the intent is to remove a potentially
dangling pointer.
2021-05-11 09:49:39 -07:00
jdgleaver c37f540b72 Core Info Cache Improvements
- Core info cache can now be enabled/disabled on all platforms via a new `Settings > Core > Cache Core Info Files` option
- Core info cache file has been renamed from `.cache` to `core_info.cache` (i.e. it is no longer a 'hidden' file on Unix platforms, so can be deleted easily)
- The core info cache file is now compressed (rzip) to further reduce disk IO
- The presence of a `core_info.refresh` file in the core info directory will force a one-time refresh of the info cache. This file is generated automatically when toggling on the `Cache Core Info Files` option, and we will also add it to core info file packaging such that updating info files (either manually or via the online updater) will force a refresh
- The core info cache no longer contains 'core is locked' and 'firmware missing' data fields; these are 'dynamic' properties that must be determined at runtime
- The 'core is locked' status is now determined on core info intialisation by parsing the core directory listing, rather than by performing indivdual 'lock file exists' checks. This minimises file IO, and greatly improves performance on devices with slow storage
- While parsing the core info cache file, we now avoid unnecessary `strdup()`s when adding entries to the resultant cache list
- Memory leaks (potential and real) have been fixed, and safety checks added
- Build errors have been fixed
2021-05-06 15:00:55 +01:00
Jamiras 77d04af845 enforce minimum fastforward_ratio of 1.0 2021-04-28 22:43:48 -06:00
Nathan Strong d7075296e3 Move runloop data to static struct
== DETAILS
As part of a larger project to reduce/eliminate global state, this commit does the following:

1. move all the `runloop_` members of the `rarch_st` struct to a separate structure
2. create a static instance of that struct in retroarch.c
3. switch all references of `p_rarch->runloop_*` to `runloop_state.*`
4. remove the extraneous `runloop_` prefix on the new struct's members
2021-04-26 09:21:01 -07:00
jdgleaver f4511f6fa4 (core_info) Performance optimisations + code clean-ups/refactors 2021-04-26 14:30:31 +01:00
twinaphex d2af1e905c Fix runahead 2021-04-23 13:18:29 +02:00
Autechre d24f808d79
Merge pull request #12294 from ToKe79/lakka_timezone
Lakka: add menu for time zone setting
2021-04-22 18:38:19 +02:00
jdgleaver 80753ac741 Add search filter support to cheats and overlays file browser menus 2021-04-22 16:56:57 +01:00
Tomáš Kelemen (vudiq) 90529c62b2 Lakka: add menu for time zone setting
This adds new entry under Settings -> Services (where all Lakka related
services are currently available, such as switches for services like
SSH, Samba, etc.). By adding this the users do not have to use the
command line / access the file system directly to change their local
time zone to adjust the date/time displayed in RetroArch.
2021-04-21 18:12:42 +02:00
twinaphex ae21979b7c Remove unused variable 2021-04-21 15:58:51 +02:00
twinaphex ba791b7de8 Add better fix that targets all statically linked platforms instead of 2021-04-21 15:58:18 +02:00
twinaphex 220bc434be Get rid of strcpy_alloc 2021-04-21 02:25:51 +02:00
twinaphex e88fad00a5 copy_core_to_temp_file - get rid of a bunch of strcat_alloc calls,
instead just use fill_pathname_join once and have retroarch_tmp_path
be a fixed stack array variable
2021-04-20 21:29:02 +02:00
twinaphex 769fb7cd02 Cleanup 2021-04-20 19:35:59 +02:00
jdgleaver b193fd0ba9 Enhanced 'Load Content' file browser search functionality 2021-04-20 15:49:22 +01:00
LazyFunker c5e5cf28af Force resolution on UWP 2021-04-20 11:47:32 +02:00
Autechre a56fcfb24a
Revert "Screen Resolution option fixes" 2021-04-17 19:33:23 +02:00
twinaphex 46a37b9bd9 Silence some warnings 2021-04-16 17:55:19 +02:00
twinaphex 9812f368e7 Move more of these static variables out of retroarch_data.h 2021-04-15 19:51:40 +02:00
twinaphex 0f4dbcfc53 move arrays over to only function that uses them 2021-04-15 19:51:40 +02:00
twinaphex 67c06d17bb command_event_runtime_log_deinit - put verbosity_is_enabled check around
this
2021-04-15 08:08:08 +02:00
twinaphex 9f902c8bd4 input_joypad_analog_button - only call fabs when input value is not 0 2021-04-15 07:27:43 +02:00
twinaphex 52454591aa Small cleanup to input_joypad_analog_button 2021-04-15 07:22:59 +02:00
twinaphex cfe9d60f51 Get rid of button_is_pressed 2021-04-15 06:55:35 +02:00
twinaphex 4ec8b82388 Cleanups 2021-04-14 03:46:50 +02:00
twinaphex 65c01b35ec Go back to Discord RPC I/O Thread codepath for now - the non-I/O
thread codepath seems to be unreliable for now
2021-04-13 16:44:46 +02:00
twinaphex 2f0f724813 Use more path_basename_nocompression where we don't have to deal with
archive files
2021-04-11 18:46:50 +02:00
twinaphex 637cff628f * Simplify RARCH_CTL_IS_CORE_LOADED
* Create specialized function path_basename_nocompression
2021-04-11 17:27:31 +02:00
twinaphex 3841fecc59 Cleanups 2021-04-11 17:01:13 +02:00
twinaphex bc08e325ce Travis buildfix 2021-04-11 02:22:35 +02:00
twinaphex 59449600ad Cleanup retroarch_menu_running_finished 2021-04-10 21:04:00 +02:00
twinaphex c392a475ee Cleanups 2021-04-10 20:51:19 +02:00
twinaphex d024ff553f Cleanups 2021-04-10 20:47:04 +02:00
twinaphex ca5ce839ce Small cleanups to button input handling code - several parameters
were no longer used
2021-04-10 19:06:56 +02:00
twinaphex 760fc6b3f7 Simplify button_is_pressed 2021-04-10 18:44:10 +02:00
twinaphex 372f939cc9 Simplify input_keys_pressed 2021-04-10 18:25:50 +02:00
twinaphex 5df321fcaa Cleanups 2021-04-10 18:19:20 +02:00
twinaphex 8b197e49bb accessibility_speak_priority - no longer dependent on settings pointer 2021-04-10 14:59:34 +02:00
twinaphex 200983f938 is_narrator_running -don't pass entire settings pointer 2021-04-10 14:24:41 +02:00
twinaphex dd7fe2e7e0 Cleanups 2021-04-10 14:19:52 +02:00
twinaphex 1e94070dca Simplify driver_adjust_system_rates 2021-04-10 13:39:47 +02:00
twinaphex 40ab6f839a Some cleanups to driver_adjust_system_rates 2021-04-10 13:32:27 +02:00
twinaphex 43cb646870 Turn video_driver_monitor_adjust_system_rates into pure function 2021-04-10 13:22:12 +02:00
twinaphex d1d9f96ab3 Turn audio_driver_monitor_adjust_system_rates into pure function 2021-04-10 13:11:01 +02:00
twinaphex d910f520d9 Don't pass entire settings pointer if we just need a few settings variables
to read
2021-04-10 13:03:53 +02:00