Commit Graph

950 Commits

Author SHA1 Message Date
Cthulhu-throwaway 690c802921
Netplay Stuff (#13375)
* Netplay Stuff

## PROTOCOL FALLBACK
In order to support older clients a protocol fallback system was introduced.
The host will no longer send its header automatically after a TCP connection is established, instead, it awaits for the client to send his before determining which protocol this connection is going to operate on.
Netplay has now two protocols, a low protocol and a high protocol; the low protocol is the minimum protocol it supports, while the high protocol is the highest protocol it can operate on.
To fully support older clients, a hack was necessary: sending the high protocol in the unused client's header salt field, while keeping the protocol field to the low protocol. Without this hack we would only be able to support older clients if a newer client was the host.
Any future system can make use of this system by checking connection->netplay_protocol, which is available for both the client and host.

## NETPLAY CHAT
Starting with protocol 6, netplay chat is available through the new NETPLAY_CMD_PLAYER_CHAT command.
Limitations of the command code, which causes a disconnection on unknown commands, makes this system not possible on protocol 5.
Protocol 5 connections can neither send nor receive chat, but other netplay operations are unaffected.
Clients send chat as a string to the server, and it's the server's sole responsability to relay chat messages.
As of now, sending chat uses RetroArch's input menu, while the display of on-screen chat uses a widget overlay and RetroArch's notifications as a fallback.
If a new overlay and/or input system is desired, no backwards compatibility changes need to be made.
Only clients in playing mode (as opposed to spectating mode) can send and receive chat.

## SETTINGS SHARING
Some settings are better used when both host and clients share the same configuration.
As of protocol 6, the following settings will be shared from host to clients (without altering a client's configuration file): input latency frames and allow pausing.

## NETPLAY TUNNEL/MITM
With the current MITM system being defunct (at least as of 1.9.X), a new system was in order to solve most if not all of the problems with the current system.
This new system uses a tunneling approach, which is similar to most VPN and tunneling services around.

Tunnel commands:
RATS[unique id] (RetroArch Tunnel Session) - 16 bytes -> When this command is sent with a zeroed unique id, the tunnel server interprets this as a netplay host wanting to create a new session, in this case, the same command is returned to the host, but now with its unique session id. When a client needs to connect to a host, this command is sent with the unique session id of the host, causing the tunnel server to send a RATL command to the host.
RATL[unique id] (RetroArch Tunnel Link) - 16 bytes -> The tunnel server sends this command to the host when a client wants to connect to the host. Once the host receives this command, it establishes a new connection to the tunnel server, sending this command together with the client's unique id through this new connection, causing the tunnel server to link this connection to the connection of the client.
RATP (RetroArch Tunnel Ping) - 4 bytes -> The tunnel server sends this command to verify that the host, whom the session belongs to, is still around. The host replies with the same command. A session is closed if the tunnel server can not verify that the host is alive.

Operations:
Host -> Instead of listening and accepting connections, it connects to the tunnel server, requests a new session and then monitor this connection for new linking requests. Once a request is received, it establishes a new connection to the tunnel server for linking with a client. The tunnel server's address and port are obtained by querying the lobby server. The host will publish its session id together with the rest of its info to the lobby server.
Client -> It connects to the tunnel server and then sends the session id of the host it wants to connect to. A host's session id is obtained from the json data sent by the lobby server.

Improvements (from current MITM system):
No longer a risk of TCP port exhaustion; we only use one port now at the tunnel server.
Very little cpu usage. About 95% net I/O bound now.
Future backwards compatible with any and all changes to netplay as it no longer runs any netplay logic at MITM servers.
No longer operates the host in client mode, which was a source of many of the current problems.
Cleaner and more maintainable system and code.

Notable functions:
netplay_mitm_query -> Grabs the tunnel's address and port from the lobby server.
init_tcp_socket -> Handles the creation and operation mode of the TCP socket based on whether it's host, host+MITM or client.
handle_mitm_connection -> Creates and completes linking connections and replies to ping commands (only 1 of each per call to not affect performance).

## MISC
Ping Limiter: If a client's estimated latency to the server is higher than this value, connection will be dropped just before finishing the netplay handshake.
Ping Counter: A ping counter (similar to the FPS one) can be shown in the bottom right corner of the screen, if you are connected to a host.
LAN Discovery: Refactored and moved to its own "Refresh Netplay LAN List" button.

## FIXES
Many minor fixes to the current netplay implementation are also included.

* Remove NETPLAY_TEST_BUILD
2021-12-19 16:58:01 +01:00
Tony 8cc423e036
Logging cleanups (#13370) 2021-12-17 18:04:24 +01:00
GavinDarkglider a60df14d81
Lakka/Nintendo Switch: disable cpu scaling for Nintendo Switch
Lakka on Nintendo Switch uses own cpu governor.

Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-04-cpufreq-wip-disable-on-switch.patch
2021-11-17 22:15:35 +01:00
twinaphex 5ef57909ef (menu_driver.c) Get rid of menu_state_get_ptr calls 2021-11-06 02:12:21 +01:00
twinaphex 3cea5996bc Move code from retroarch.c to menu_driver.c 2021-11-06 02:13:10 +01:00
gblues 1ef78d3e3d
Any pad can control the menu (#13173)
* Any pad can control the menu

== DETAILS
I am not sure I've quite got it so that any pad can *open* the
menu, but I do have it so any pad can control it.

- split out the input processing into a separate method
- track down and squish some hairy bugs that boiled down to
  bad pointer math
- it looks like `menu_driver.c` has a mix of line endings, so I
  ran it through `dos2unix` so it has consistent line endings
  again.
- verified that this change did not impact actual cores

* optimize out cumulative_bits

* Incorporate PR feedback

Many thanks to @jdgleaver for providing these optimizations.

* apply one more optimization
2021-11-03 16:32:15 +01: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
Tomáš Kelemen (vudiq) 643a1c7e6f add header for cpufreq
functions using set_cpu_scaling_signal() (used by Lakka) have been
moved, but the header was not added
2021-10-24 12:41:23 +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 8db4e2a862 Get rid of HAVE_MENU ifdefs in menu_driver.c 2021-10-15 14:01:44 +02:00
twinaphex af40baa04d Address feedback 2021-10-15 13:54:04 +02:00
twinaphex a16df36b28 Don't use menu_state_get_ptr from inside menu_driver.c 2021-10-15 04:01:06 +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 a79bd56018 (WiiU) Prevent implicit declarations 2021-10-13 20:22:01 +02:00
twinaphex 8bab67ea9c Potential buildfix for targets without HAVE_AUDIOMIXER support 2021-10-13 19:51:28 +02:00
twinaphex 753a04c9c1 Move menu_driver_toggle to menu_driver.c 2021-10-13 17:59:45 +02:00
twinaphex f070da6dfc Move code to menu_driver.c and input_driver.c 2021-10-13 15:40:01 +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 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 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 8ef9065c86 Get rid of menu_driver_is_alive - we don't want these one/two-line getters/setters anymore 2021-09-28 10:27:00 +02:00
twinaphex e31fbb8048 Move menu_driver_alive to menu_state 2021-09-28 10:11:13 +02:00
twinaphex 9e26012751 Move menu_driver_init_internal to menu_driver.c 2021-09-28 09:32:11 +02:00
twinaphex 0448afab96 Move video driver functions over to gfx/video_driver.c 2021-09-27 19:37:22 +02:00
twinaphex 83ce4259a0 Have only one getter for runloop_state 2021-09-21 19:08:26 +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 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 beea0e2c8d Fix header include 2021-09-21 00:52:05 +02:00
twinaphex f3b2e233bb Move more code to menu_driver.c 2021-09-21 00:51:15 +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 1c546cb7fd move more code out of retroarch.c 2021-09-18 21:03:16 +02:00
twinaphex 7c74e035b0 Small cleanups 2021-09-18 06:15:02 +02:00
twinaphex b5138b6122 Move input_config_get_bind_string to input_driver.c 2021-09-12 17:41:00 +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 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 10782f9abc Cleanups - move code over to menu_driver.c 2021-09-07 11:55:12 +02:00
twinaphex a0856c9847 Move another function to menu_driver.c 2021-09-07 07:14:27 +02:00
twinaphex 19f4504943 Prevent collision with quasi88 in statically linked cores 2021-09-03 21:29:38 +02:00
jdgleaver 508b0c2ee2 Add enhanced search functionality to the 'Cheats' menu 2021-09-03 14:58:33 +01:00
twinaphex 93dbd746db (Android) Buildfix 2021-09-03 06:31:40 +02: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 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 09f85d130d Merge menu_driver.c into retroarch.c - yes, it's even bigger I know,
this is so that we can consolidate global state and then start splitting
things up across several files
2020-06-05 19:29:14 +02:00
jdgleaver 0a33e562f4 Add option to backup/restore installed cores 2020-06-04 12:20:58 +01:00
twinaphex 56619d7276 Add more TODO/FIXME notes 2020-05-29 06:31:15 +02:00
jdgleaver 9f4a9e9cd6 Core updater improvements 2020-05-27 17:02:43 +01:00
jdgleaver 18912ac23d Enable configuration of date seperator in clock and runtime 'last played' displays 2020-05-25 15:46:53 +01:00
im4potato 1c4cb37e61 Unify timedate ENUMs and cleanup 2020-05-21 16:26:06 -07:00
Francisco Javier Trujillo Mata 1eeb3dcf30 Adapt PS2 port to new SDK with newlib support (CDVDFS support is missing) 2020-05-20 20:13:19 +02:00
twinaphex 9e5f00ba27 Turn retroarch_fail static 2020-05-20 04:43:35 +02:00
twinaphex 9ace693ec0 Refactor menu_driver_frame 2020-05-19 16:20:43 +02:00
twinaphex 25888db0af (menu_driver.c) Move state into struct 2020-05-19 13:40:27 +02:00
jdgleaver eff8c31ffd (XMB/GLUI) Limit tab switch rate when input repeat is active 2020-05-14 11:24:32 +01:00
twinaphex 10e6ea21a3 Put this behind HAVE_ACCESSIBILITY ifdef 2020-05-10 07:17:15 +02:00
twinaphex ba8a07a2b6 (Menu driver) Turn some functions into static functions 2020-05-10 07:14:29 +02:00
Barry Rowe 289be872f3 Added in auto-translate support, fixes for ozone and glui accessibility, and support for nvda and SAPI narration. 2020-04-13 17:46:08 -07:00
Ryunam 0310f6dafd Add European timedate style (DD/MM/YYYY) and reorder timedate options 2020-03-15 16:00:03 +01:00
twinaphex 935393b391 Cleanups 2020-03-07 23:12:02 +01:00
twinaphex b5c87aaef8 (menu_driver.c) Go through wrapper 2020-03-05 13:26:36 +01:00
twinaphex d592959be8 When settings struct gets modified, go through macros to set
the modified flag
2020-03-05 13:00:43 +01:00
twinaphex bea4f8aad3 (menu_dialog.c) Cleanups 2020-03-04 22:21:18 +01:00
twinaphex 8d3b22091c Get rid of menu_dialog_is_push_pending 2020-03-04 22:12:42 +01:00
twinaphex 32e4aea068 Start making the other code safe that is dependent on menu driver
ident checking
2020-03-04 20:47:39 +01:00
twinaphex 2637bd648b Cleanups 2020-03-04 19:13:30 +01:00
twinaphex 7d908da30f Address TODO/FIXME 2020-02-29 07:45:17 +01:00
twinaphex add0cedc48 * Reduce the amount of cpu_features_get_time_usec calls
* Put code behind menu ifdefs
2020-02-29 07:41:05 +01:00
twinaphex a6c9bb95f0 Remove HAVE_XUI 2020-02-26 19:09:00 +01:00
twinaphex f5bc061b26 Merge menu_generic.c into menu_driver.c 2020-02-26 09:22:48 +01:00
twinaphex 3a76aac226 Get rid of unneeded header include 2020-02-26 08:25:56 +01:00
twinaphex b23863ae85 Reduce more cpu_features_get_time_usec calls 2020-02-26 08:17:51 +01:00
twinaphex 3ee89a16ef (Menu) Settings cleanups 2020-02-22 07:21:35 +01:00
twinaphex 53356fe61a Get rid of menu_texture_item 2020-02-17 22:28:21 +01:00
jdgleaver 12cd9e5c88 Ensure menu ID is set before initialising menu driver (fixes first-frame scaling bug) 2020-02-17 11:51:01 +00:00
twinaphex cccf8a9870 Move hex32_to_rgba_normalized to materialui.c 2020-02-17 04:01:58 +01:00
twinaphex a59eec01e1 Cleanups 2020-02-17 02:40:37 +01:00
twinaphex b00bf17153 Move menu_widgets to gfx/ and call it gfx_widgets 2020-02-17 01:54:07 +01:00
twinaphex 6b82089d6c Move menu_display code to gfx_display 2020-02-17 00:42:49 +01:00
twinaphex 550e8fff6b Move menu DPI scaling code to menu_widgets 2020-02-17 00:17:36 +01:00
twinaphex 13ea2ceaa6 Get rid of some header includes 2020-02-16 17:09:52 +01:00
twinaphex c71469c715 Rename menu_display to gfx_display 2020-02-16 15:10:07 +01:00
twinaphex 60f335cf02 Split up menu display code into separate file 2020-02-14 21:07:15 +01:00
Twinaphex 136163ba4f
Merge pull request #10114 from jdgleaver/widget-scaling
(Menu Widgets) Add scaling
2020-02-14 18:53:43 +01:00
jdgleaver 23c9b86f64 (Menu Widgets) Enable scaling of widgets independently from menu scale 2020-02-14 17:10:39 +00:00
orbea 0ea75894c1 Fix a segfault when starting the qt menu with the null menu driver. 2020-02-14 07:47:34 -08:00
jdgleaver e8a2a39d72 (Menu Widgets) Add scaling 2020-02-13 17:28:32 +00:00
twinaphex 83a03b6679 Silence this warning 2020-02-12 14:16:09 +01:00
twinaphex debbd9f15b Remove unused menu_display_pixel_get_scale 2020-02-03 22:47:26 +01:00
twinaphex 67cfff2520 Remove the menu display null drivers 2020-02-03 07:04:06 +01:00
twinaphex 68467da7ac Remove menu_display_ctx_vga - is identical to menu display null 2020-02-03 06:55:15 +01:00
twinaphex 6b0a62d6ff Null video driver should work now 2020-02-03 06:49:59 +01:00
twinaphex e0fdd8d39e Add back HAVE_CONFIGFILE ifdef - will strip out remaps and overrides
support as well
2020-02-02 21:27:38 +01:00
twinaphex e5169eee71 Remove menu/drivers/null.c - move it into menu/menu_driver.c 2020-01-06 20:23:58 +01:00
twinaphex 203bea3fe6 (MIDI) Turn bunch of functions static
(Menu) Remove menu_display_null driver
2020-01-06 17:30:09 +01:00
twinaphex a6245185b9 (menu_driver.c) Cleanups 2020-01-02 18:21:43 +01:00
twinaphex 48af253a06 (Menu) This macro is no longer used 2019-12-30 07:48:55 +01:00
twinaphex f6db9ce04d Move menu_subsystem_populate to menu_displaylist.c 2019-12-30 05:57:32 +01:00
twinaphex 3fe8806018 (Subsystem Settings) Create separate subsystem settings list - will
be selectively hidden later based on whether subsystems are implemented
for the core
2019-12-30 05:43:48 +01:00
twinaphex f3742a101c Change function signature on subsystem function 2019-12-30 05:17:31 +01:00
twinaphex 9573b53390 Put ifdefs around core_updater_list_free_cached for targets
that don't define HAVE_NETWORKING
2019-12-24 05:36:54 +01:00
jdgleaver 695749f155 (Core Updater) Only download when new core is available + add option to update all installed cores 2019-12-23 17:34:44 +00:00
Barry Rowe 3a67e072bb Added in fixes for accessibility feature. 2019-12-04 10:51:50 -08:00
Barry Rowe 1e6e7a698f Added in accessibility. 2019-11-26 15:19:21 -08:00
jdgleaver 7eefec6945 (GLUI) Navigation improvements 2019-11-15 14:53:00 +00:00
jdgleaver c356969c3a (GLUI) Add initial thumbnail support 2019-10-31 17:25:55 +00:00
Barry Rowe d641e67876 AI Service overlay. 2019-10-28 16:48:05 -07:00
jdgleaver d6d0bb5e4e (GLUI) Add menu scaling workaround for Mac platforms (DPI requests currently cause crashes on Mac) 2019-10-11 13:31:00 +01:00
jdgleaver e47e055508 (GLUI) Menu scaling improvements 2019-10-10 10:01:46 +01:00
twinaphex 9fe72bfa7b Change this back to how it was before 2019-10-07 05:28:00 +02:00
Twinaphex 811138221a Fix unused variable warning 2019-10-04 17:34:46 +02:00
twinaphex daa30b1dc8 Use old DPI scaling for now on desktop until we have devised a good solution 2019-10-04 17:27:14 +02:00
jdgleaver db030f6472 (GLUI) Add initial gesture support + bug fixes 2019-10-04 09:33:15 +01:00
jdgleaver 3057c31798 (Menu Input) Add mouse/touchscreen gesture support + full gesture support for XMB 2019-09-30 16:55:41 +01:00
twinaphex 01dc71f598 (menu_driver.c) Cleanups 2019-09-23 04:49:01 +02:00
twinaphex 17fb07cb85 (Menu) Simplify menu_entries_get_core_title 2019-09-23 04:44:22 +02:00
twinaphex b94b9e2adb Go back to plain strlcpy/strlcat - probably best to look at
opportunities to reduce these calls vs. replacing them with
unsafe macros
2019-09-23 00:19:01 +02:00
twinaphex 3b057d9605 Start using STRLCAT_CONST_INCR and STRLCPY_CONST 2019-09-20 23:33:17 +02:00
twinaphex 43000d2e24 (Networking) Fix memory leak that could happen at exit after a network
operation has ran (menu_driver_data->core_buf gets allocated inside
cb_net_generic_menu and doesn't get freed until the function is ran
again
2019-09-20 04:08:03 +02:00
twinaphex db624a7c99 Start cleaning up the rather messy manual assignment 2019-09-20 02:03:26 +02:00
jdgleaver 8655038601 Overhaul menu mouse/touchscreen input handling 2019-09-19 16:53:22 +01:00
twinaphex a9ef8333eb Rewrite menu_entries_get_core_title 2019-09-18 06:35:21 +02:00
twinaphex 8fa6230426 Cleanups 2019-09-18 02:16:47 +02:00
twinaphex b28c405377 Backport and rebase initial FPGA port that was done in 2017 (port
done for Z-Turn board) - has some outstanding issues such as
very slow framebuffer software rendering output that needs to
be overcome before this becomes usable - community help needed
2019-09-17 08:16:50 +02:00
twinaphex d01ae6929d Don't use strlcat for basic concatenation of characters
except when absolutely necessary
2019-09-17 02:00:04 +02:00
jdgleaver 25006cadfe Menu time/date: Add 12-hour versions of all formats + clean ups 2019-09-09 14:06:49 +01:00
LazyBumHorse 2c028964c9 fix video_driver_get_ident for thread wrapper 2019-08-28 09:43:22 +02:00
twinaphex ab5e5d3a80 Add Quick Menu -> Views ->'Show Resume/Restart/Close content' 2019-08-20 18:08:44 +02:00
twinaphex b46545cd64 menu_driver_frame - use video_info->menu_is_alive instead 2019-08-20 17:04:06 +02:00
twinaphex dd83bc98a2 (menu_driver.c) Avoid function calls when possible 2019-08-20 16:38:45 +02:00
twinaphex 525d63f9ec use menu_entries_get_selection_buf_ptr_internal 2019-08-20 16:24:10 +02:00
twinaphex d8860104d3 Get rid of file_list_get_alt_at_offset 2019-08-20 06:13:33 +02:00
twinaphex 74c79e3962 Don't go through these superfluous functions 2019-08-20 06:03:28 +02:00
twinaphex c963b3be6a menu_display_toggle_reason was never used, get rid of it 2019-08-18 16:41:01 +02:00
twinaphex dec409bf17 Revert "Cleanups"
This reverts commit cb9a9e9525.
2019-08-17 18:51:09 +02:00
twinaphex cb9a9e9525 Cleanups 2019-08-17 16:59:18 +02:00
twinaphex f61602de59 Buildfix 2019-08-16 16:09:15 +02:00
twinaphex bf8edb18b8 Cleanups 2019-08-16 16:04:39 +02:00
twinaphex 8c74de7787 (Menu) cleanups 2019-08-16 15:51:22 +02:00
twinaphex 9d61590540 Merge menu_entries.c into menu_driver.c 2019-08-16 15:40:45 +02:00
twinaphex 9456d88ce4 Cleanups 2019-08-16 15:36:44 +02:00
twinaphex c69c972942 (Menu) Cleanups 2019-08-16 15:17:33 +02:00
twinaphex ba3e940cac (menu_driver.c) Cleanups 2019-08-14 17:19:39 +02:00
twinaphex 36ed0ca34f menu_display_get_dpi - don't use video_driver_get_size inside function 2019-08-13 17:12:55 +02:00
twinaphex 09675c26a9 Get rid of unused function menu_display_get_tex_coords 2019-08-11 17:49:49 +02:00
twinaphex bbbc69886f Simplify menu_display_push_quad 2019-08-11 17:29:22 +02:00
twinaphex 24798d7841 (Menu) Get rid of unused SET_PENDING_QUIT/SET_PENDING_SHUTDOWN 2019-08-11 17:08:59 +02:00
twinaphex 8647bbc36f Attempt to fix WiiU build 2019-08-11 14:48:32 +02:00
twinaphex 5c30b0803d Fix some typos in comments 2019-08-10 14:24:30 +02:00
twinaphex 7505251b40 Cleanups 2019-08-10 13:16:15 +02:00
twinaphex 7900faa419 Move menu_display_libretro to retroarch.c 2019-08-09 21:59:58 +02:00
twinaphex e51b93993b Move menu_driver_is_binding_state to retroarch.c 2019-08-09 21:41:10 +02:00
twinaphex b0f088d5fd Move menu_driver_is_alive to retroarch.c 2019-08-09 21:31:51 +02:00
twinaphex 4600195895 Refactor some menu_driver_alive code 2019-08-09 20:45:54 +02:00
twinaphex 4d860c4d16 Move menu_driver_render to retroarch.c 2019-08-09 12:54:08 +02:00
twinaphex 6482a81ef5 Update menu_driver_render 2019-08-09 12:09:01 +02:00
twinaphex 82168c0925 Start preparing to move menu_driver_render 2019-08-09 11:59:46 +02:00
jdgleaver 9617856c5c Remove favourites init/deinit from command event, and replace with seperate functions in retroarch.h/.c 2019-07-31 11:32:19 +01:00
jdgleaver 5220dc9084 Add independent 'favourites' playlist size setting 2019-07-30 17:13:04 +01:00
twinaphex ba79947e51 This should prevent flushing of stack issues 2019-07-22 22:40:34 +02:00
twinaphex b6b22a9a32 More shader refactors - make sure we can compile entirely
without shader support if HAVE_CG, HAVE_GLSL, HAVE_SLANG
and HAVE_HLSL are all not defined
2019-07-21 00:34:07 +02:00
twinaphex bddfca940e Add HAVE_GDI switch 2019-07-11 13:18:38 +02:00
LazyBumHorse 1f69f3960a fix d3d9 not rendering xmb and temporarily disable widgets due to segfault 2019-06-24 15:42:55 +02:00
twinaphex ee3208ac39 Integrate video_driver.c into retroarch.c 2019-06-17 15:10:22 +02:00
natinusala 7c17cd9213 menu display: use video_info for scissoring rect clipping 2019-06-11 10:08:00 +02:00
BringerethOfLight 50720f0a92 menu display: don't move scissoring rect
don't just return from the function either, instead set w/h to 0
2019-05-27 20:00:54 +00:00
natinusala d50e326825 menu display: don't cancel scissoring if the rect is empty 2019-05-27 10:10:50 +02:00
twinaphex f88ec1e54e (MSVC 2003) Fixup MSVC 2003 solutions; fixup targets that don't have
HAVE_NETPLAY defined
2019-05-27 04:04:27 +02:00
twinaphex 5dc11fcd31 Reimplement 'fix ozone issues on mali400 gpu. as a bonus, fixes #5378'
by BringerethOfLight
2019-05-24 04:13:55 +02:00
twinaphex eed2ea7a99 string_is_empty check is already being done by path_is_valid/file stat
path cb function
2019-05-22 03:05:31 +02:00
jdgleaver 98889e1652 Ensure that displayed thumbnails are always refreshed correctly after selecting 'Download Thumbnails' from quick menu 2019-05-20 16:09:59 +01:00
jdgleaver 77c2ceeff4 (menu_driver) Prevent spurious navigation events when invoking MENU_NAVIGATION_CTL_CLEAR 2019-05-17 11:44:57 +01:00
jdgleaver 05c8694e1c Add 'Download Thumbnails' option to quick menu 2019-05-16 14:34:01 +01:00
twinaphex 62f3046f0f (localtime) Cleanups 2019-05-12 04:43:57 +02:00
jdgleaver 2e68a634a2 Optimise menu_display_timedate() 2019-05-01 10:58:40 +01:00
jdgleaver 55737ba127 Standardise menu powerstate access + add battery indicator to RGUI 2019-04-30 15:57:38 +01:00
jdgleaver b301e4d444 (RGUI) Performance optimisations 2019-04-05 09:16:29 +01:00
twinaphex d7d260556b Revert "(RGUI) Move menu_display_font_framebuffer to rgui.c"
This reverts commit 1a3ec1c3be.
2019-04-04 17:51:58 +02:00
twinaphex 1a3ec1c3be (RGUI) Move menu_display_font_framebuffer to rgui.c 2019-04-03 23:06:56 +02:00
twinaphex 643cd1923e CXX_BUILD / C89_BUILD buildfixes 2019-03-14 14:14:44 +01:00
Themaister 3029f96511 Add a new "glcore" driver with slang support.
This driver should sunset the old gl2 driver, but that driver will
likely live on to support really ancient and terrible GL stacks.
All the worst legacy cruft has been ripped out, and it's almost a decent
backend now.

Requirements for slang are GL 3.2+ or GLES3.
Some shaders require features which are not directly compatible with
GLES2 or legacy GL.

This driver shares a lot of concepts from the Vulkan driver.
The slang shader stack and SPIRV-Cross are used to implement the shader
spec, and the menu shaders are also shared with Vulkan.
2019-03-09 12:30:49 +01:00
orbea 8bc25472be Stop giant memory leak with --disable-discord and sixel. 2019-03-04 15:23:47 -08:00
Twinaphex 58a71c0ae8
Merge pull request #8394 from fjtrujy/feature/FIOImprovements
[PS2] Files IOS improvements
2019-03-02 16:25:50 +01:00
Francisco Javier Trujillo Mata 6d2bba220f [PS2] Improvements with the device detection and different folder to save config 2019-03-02 16:06:36 +01:00
twinaphex ea68e82b1e Add comment 2019-02-28 23:25:48 +01:00
Brad Parker 4f0d61a2ac update copyright 2019-02-22 19:13:36 -05:00
twinaphex 158a442036 Add further HAVE_OPENGL1 support 2019-02-17 10:42:16 +01:00
jdgleaver 3192bd018a Replace UCN identifiers with UTF-8 byte arrays + provide Apple fallback 2019-02-16 12:50:47 +00:00
natinusala f481c594e8 menu_animation: use milliseconds as a unit 2019-02-14 19:24:31 +01:00
natinusala bfcc32b7be menu_display: don't draw text if alpha is 0 2019-02-14 19:11:36 +01:00
Brad Parker 44c4be1863 add option to track how long content has been running over time 2019-02-12 00:32:01 -05:00
jdgleaver 930bb5d71f (RGUI) Add menu sublabel support 2019-02-11 14:38:10 +00:00
Brad Parker d64933b30d gl1: put behind HAVE_OPENGL1, off by default for now 2019-02-08 16:04:23 -05:00
Brad Parker 74fd184097 initial GL1 video driver, only rgui is working currently 2019-02-08 12:14:55 -05:00
jdgleaver 64e6d073d3 Silence gcc snprintf() warnings in menu_driver.c 2019-02-08 11:37:53 +00:00
twinaphex 59ded50d59 (Menu) Add back get_load_content_animation_data 2019-02-08 08:24:33 +01:00
twinaphex 386657a366 (menu widgets backport) Re-commit task queue changes 2019-02-08 08:00:32 +01:00
twinaphex 7022786f34 Revert parts of menu_widgets that were causing breakage, but leave
all the hooks in so we can add them back piece by piece again
2019-02-08 07:26:43 +01:00
Twinaphex 4ce93b11ee
Merge pull request #8194 from jdgleaver/rgui-subsystem
(RGUI) Add Subsystem support
2019-02-07 14:50:31 +01:00
natinusala c20ab3864d First version of menu widgets (gl only) 2019-02-06 20:48:24 +01:00
jdgleaver 6b3e5fa7a0 (RGUI) Add Subsystem support (+ fix memory leak in environ_cb_get_system_info()) 2019-02-06 14:25:25 +00:00
orbea 98f6aecec2 Remove the zarch menu driver. 2019-02-02 22:15:10 -08:00
twinaphex 9aa542b1ae * Get rid of video_shader_driver_use
* Get rid of Nuklear - ozone/menu widgets is probably the replacement
for it - Zarch will go next
2019-02-03 04:37:54 +01:00
Brad Parker 90db5e7e27 Implement in-menu sound effects 2019-01-27 11:22:16 -05:00
twinaphex c98b2e2292 Buildfixes and more static code analysis warning fixes 2019-01-10 22:24:43 +01:00
Twinaphex 6384313279
Merge pull request #7914 from orbea/menu
menu: Display menu drivers in alphabetical order.
2019-01-07 10:03:27 +01:00
orbea d25b632b88 Fix segfault with null menu driver. (#7913) 2019-01-06 23:34:25 -05:00
orbea 161785f588 menu: Display menu drivers in alphabetical order. 2019-01-06 17:38:16 -08:00
twinaphex bb5cd1dfeb Change C++ comments to c 2018-12-31 21:08:25 +01:00
Francisco Javier Trujillo Mata d44ad6abd4 PS2 TODOs 2018-12-31 18:56:22 +01:00
twinaphex 0e5fbbb9e1 Silence some warnings 2018-12-29 02:12:50 +01:00
krzys-h b201d669b5 First iteration of UWP support
Enough to kind of run

Working drivers: xinput, d3d11
Still missing: input driver with keyboard support, audio driver
2018-12-28 22:09:22 +01:00
orbea 4da7092aff menu: Reset position after pushing quick menu.
Fixes:
  https://github.com/libretro/RetroArch/issues/5595
  https://github.com/libretro/RetroArch/issues/2506
2018-12-21 18:43:14 -08:00
orbea 169002ef7f Fix a gcc -Wformat= warning with C89_BUILD.
The posix spec claims "%r" is equivelent to "%I : %M : %S %p".

Source: http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html

menu/menu_driver.c:395:15: warning: ISO C90 does not support the ‘%r’ gnu_strftime format [-Wformat=]
             "%r", localtime(&time_));
               ^
2018-12-16 19:59:47 -08:00
orbea 6e95a62fdf Fix c89 build with clang. 2018-12-16 07:02:14 -08:00
Stuart Carnie c00b6e0750
fix: Fix use of freed memory in menu animations
`menu_animation_update` enumerates `menu_animation.list` to process each
`tween`. It was observed that some tweens execute a callback that
pushes more animations via `menu_animation_push`. During the push, if
the tween `list` does not have enough space, a `realloc` occurs,
potentially invalidating the existing list. The remaining pointer access
in menu_animation_update is therefore invalid. Best case is the memory
is unused and thus does not affect the program. Worst case is memory
corruption.
2018-12-15 14:55:10 -07:00
radius 45228d0307 massive subsystem cleanup & use the proper data in each instance 2018-12-10 23:01:21 -05:00
natinusala c1f3f79119 menu_display: fix glitch in draw_texture_slice 2018-11-14 15:30:09 +01:00
natinusala f493c114b5 ozone: fix visual issues, add fade in/out to messagebox 2018-11-14 14:18:14 +01:00
natinusala 73f6e51892 ozone: improve OSK display 2018-11-13 15:48:16 +01:00
natinusala 5406e19c3e ozone: add missing assets message 2018-11-09 17:00:44 +01:00
natinusala 20a8e1b40f ozone: fancy new cursor 2018-11-09 16:51:34 +01:00
natinusala b5f869bf25 ozone: implement messagebox and OSK 2018-11-08 12:00:06 +01:00
twinaphex a4d75e3dd8 C89 buildfix 2018-10-27 02:57:50 +02:00
natinusala 158ddc0b2a New menu driver : ozone (Nintendo Switch lookalike) 2018-10-26 13:24:32 +02:00
Twinaphex c29654b504
Merge pull request #7332 from grimpunch/master
Date Time setting for AM:PM as an option
2018-10-07 02:31:21 +02:00
twinaphex 7260e52a23 Make improved version of this - 873d60151f 2018-10-06 17:48:12 +02:00
Brad Parker 7366a46bc2 convert AM/PM string from local encoding to utf8 2018-10-05 19:02:50 -04:00
=Christian Murphy 017d1b710e Restore default time mode, replace non-sensical time date formats with more commonly used ones 2018-10-05 23:11:38 +01:00
=Christian Murphy 940a03f552 Linux friendly datetime locale settings, slightly less friendly datetime locale settings for Windows 2018-10-01 23:32:54 +01:00
=Christian Murphy b3cf7150d5 Date Time setting for AM:PM as an option 2018-09-30 18:01:43 +01:00
twinaphex b0dd64c9f3 Change function prototype for scissor_end 2018-09-28 22:52:00 +02:00
twinaphex 60d537fa32 Create menu_driver_list_insert 2018-09-26 14:25:28 +02:00
twinaphex 5d1fff541b Create new functions 2018-09-26 14:22:22 +02:00
twinaphex 7aea66677b Merge menu_input.c and menu_event.c 2018-09-25 16:46:15 +02:00
twinaphex 44a0c70c8a Removed unused RARCH_MENU_CTL_REFRESH 2018-09-25 16:28:36 +02:00
natinusala 7ec2011ccf menu_display_gl: added scissoring support 2018-09-20 14:48:07 +02:00
Twinaphex df5476f0c0
Merge pull request #7210 from fr500/master
WIP: Discord "ask to join"
2018-09-15 06:37:32 +02:00