Commit Graph

2318 Commits

Author SHA1 Message Date
LibretroAdmin
07378abbdf (task_save) Use flags instead of booleans
(task_screenshot) Start reducing amount of parameters
2022-10-30 18:41:41 +01:00
AKuHAK
c3914d1c85
(database) Added serial scanning for PS2 (#14566)
reworked ps1 magic numbers
PS1 scan: fixed not scanned LSP titles, added PSX.EXE titles, extended ps1 serial variations
2022-10-30 17:21:48 +01:00
neil4
2de52baf74
Overlays: Add eightway area types (#14565)
- New descriptors: 'dpad_area' and 'abxy_area'
- Each has a diagonal sensitivity setting, 100% being 8-way symmetry
- Buttons can be redefined in the cfg file

E.g. This would create a d-pad area, then redefine it to use analog directions:
overlay0_desc0 = "dpad_area,0.85,0.57,rect,0.166228,0.295516"
overlay0_desc0_up = "r_y_minus"
overlay0_desc0_down = "r_y_plus"
overlay0_desc0_left = "r_x_minus"
overlay0_desc0_right = "r_x_plus"
2022-10-30 06:31:27 +01:00
neil4
1dd165a3bf
Fix overlay next_index for unnamed targets (#14562) 2022-10-29 16:33:34 +02:00
LibretroAdmin
44cb5be2ef (task_content.c) Cut down on code duplication 2022-10-25 16:32:16 +02:00
sonninnos
03c901dfb8
Playlist + database changes: (#14531)
- Cleanup 'entry_slot'
- Fallback label + logging
2022-10-18 21:32:54 +02:00
sonninnos
bbd6c0ae9a
Add delay to savestate notifications (#14514) 2022-10-15 11:29:07 +02:00
LibretroAdmin
a153738bbd Create retroarch_get_flags and use it 2022-10-12 13:27:54 +02:00
LibretroAdmin
41de5ec80b Cleanups for runloop_state grabbing 2022-10-10 20:32:46 +02:00
LibretroAdmin
cc3a339011 (Runloop) Use more flags 2022-10-10 19:54:54 +02:00
Bernhard Schelling
c9bbe7683f
Add View feature (#14467)
* Add View feature
Add saving of a filter set in the Explore menu into a so called "View" file which then gets listed alongside playlists.
This also adds the ability to filter a category by range in the Explore menu and not just filter on exact matches.

* Menu improvements for explore and views

* Collapse ozone sidebar in view

* Fix problems with the sidebar in explore/view

* Ignore view files in the Qt playlists menu

* Add missing semicolon

* Support downloading thumbnails in views
2022-10-10 06:36:02 +02:00
LibretroAdmin
076a1a398c (Runloop) Turn some boolean variables into flags 2022-10-10 04:37:17 +02:00
LibretroAdmin
2218ea1d96 Buildfix for libnx 2022-10-10 01:49:31 +02:00
LibretroAdmin
2cddea21f8 * Cleanups
* Less pointer grabbing (dispwidget_get_ptr)
2022-10-09 22:53:39 +02:00
LibretroAdmin
479e3b23d9 Turn content_get_status into content_get_flags 2022-10-09 20:32:39 +02:00
LibretroAdmin
d5a6c4f150 (content) use flags for content_state
(xaudio2) Use flags
2022-10-09 10:20:43 +02:00
LibretroAdmin
fcbd72dbf3
Use flags pt4 (#14497)
* * Use flags for rarch_state
* Get rid of ^M linebreaks in retroarch_types.h

* Buildfixes for consoles

* (audio driver) use flags instead of bools

* (video) Use flags instead of bools

* Rewrite input driver state bools into flags
2022-10-08 10:39:15 +02:00
LibretroAdmin
f40d157571
Use flags pt3 (#14491)
* (Vulkan) Use flags for vulkan_emulated_mailbox

* Use flags for vk_texture

* dispgfx_widget - use flags instead of bools

* (Autoconfig) Use flags
2022-10-07 11:08:17 +02:00
LibretroAdmin
91119d038f
(gfx_display/gfx_animation) Use flags instead of bools (#14488)
* (gfx_display/gfx_animation) Use flags instead of bools
* (task_save) Use flags instead of bools
2022-10-07 00:10:32 +02:00
LibretroAdmin
4f071e47c7 screenshot_task_state - use flags instead of bools 2022-10-06 20:57:07 +02:00
LibretroAdmin
951b98fe1b
Bools to flags (#14486)
* (D3D11) Use flags instead of bools

* (RPNG) Use flags

* Simplify rpng_is_valid

* (rpng_is_valid) Prevent potential NULL pointer dereference
(D3D11) Some whitespacing changes/code nits

* (task_pl_thumbnail_download.c) Simplify some code
2022-10-06 19:26:38 +02:00
LibretroAdmin
30eb0edcf8 Use flags for some structs instead of tons of bools - less state/variables to bookkeep,
less memory used
2022-10-06 06:53:13 +02:00
sonninnos
4fe477ee39
Avoid 'video_gpu_screenshot' with savestates (#14464) 2022-10-03 15:13:01 +02:00
sonninnos
4806105a2c
Logging cleanups (#14393) 2022-09-06 18:48:58 +02:00
Bobby Smith
82cac0f9ba
Fix Redump bin/cue scan for some DC games + add RVZ/WIA scan support for GC/Wii (#14380) 2022-09-06 01:52:01 +02:00
sonninnos
c4c55077a1
Allow On-Demand Thumbnails in Explore menu (#14385) 2022-09-05 00:01:38 +02:00
LibretroAdmin
654203be0a (Autosave) Change/improve exit behavior of autosave thread -
if condition variable is signaled, the loop is ran another
last time so we can do a final check/save before stopping the thread.
Old commit courtesy of tobiasjakobi
2022-09-03 00:21:58 +02:00
LibretroAdmin
2463a63c78 (task_save.c) Miscellaneous cleanups:
* Remove unused return type of one function
* Remove some TODO/FIXME notes
* Small style nits
2022-09-02 23:35:48 +02:00
LibretroAdmin
003cea5d42 Fix some 'implicit conversion loses precision' warnings 2022-09-01 15:15:48 +02:00
LibretroAdmin
60030e373e
Reduce snprintfs + assorted cleanups (#14369)
* Reduce snprintf and/or use them only for concatenating the
string formatting of numbers/values
* Reduce snprintfs
* Use snprintf for concatenation at parts
* * We don't need to NULL-terminate strings that get passed to strlcpy/strlcat
and friends
* Use snprintf for concatenation in certain instances
* Do away with some string intermediary copies where we can avoid it
* Fix warning unused variable
* * Reduce snprintf calls
* Rewrite snprintf calls into strlcpy where possible
* Use snprintf for concatenation when necessary
* Do away with some string intermediary copies in task_translation.c
* run_translation_service - make switch slightly smaller
2022-09-01 04:17:07 +02:00
LibretroAdmin
08154e2656 (task_autodetect.c) Use snprintfs for concatenating strings (and only
use them for formatting numbers/values)
2022-08-29 14:05:16 +02:00
LibretroAdmin
19c72a413f (gfx_thumbnail_path.c) Cache localized string
(menu_displaylist.c) Some optimizations:
* Make sure val_d is never bigger than 16, it should just
contain a number. 16 is more than plenty (and probably too big even)
* Hose val_d out of loops if its value never changes inside the loop
* Attempt to avoid calling msg_hash_to_str inside loops unnecessarily
2022-08-27 13:20:29 +02:00
LibretroAdmin
87de6bda46 (input_autoconfigure_disconnect_handler) Simplify some code 2022-08-27 09:22:20 +02:00
LibretroAdmin
61e24132bf (task_save.c) Simplification in control flow
(snprintf) Try to reduce or simplify snprintf calls, only tend to
use it for processing integers/numbers and avoid it for regular
string concatenation (NOTE: we try to be a bit safer about it to
address earlier cited criticism, although we don't consider concatenating
3 or 4 characters at the end to be insecure)
(msg_hash_to_str) Try to avoid duplicate calls to the same localized
string when we can just cache the results once instead locally
2022-08-27 07:55:02 +02:00
LibretroAdmin
7507e20703 Revert "(RJSON) Combine multiple consecutive rjsonwriter_raw calls into one"
This reverts commit 82efa5a3d6.
2022-08-26 14:44:29 +02:00
LibretroAdmin
82efa5a3d6 (RJSON) Combine multiple consecutive rjsonwriter_raw calls into one
- significantly reduces the amount of function calls
2022-08-26 13:55:52 +02:00
LibretroAdmin
575e331fd1 If we already know the length of the string, use strldup instead.
Avoids the internal strlen call inside strdup, and strdup is a deprecated
function starting from MSVC2005 anyways.

NOTE: Do NOT pass STRLEN_CONST as n parameter to strldup, it needs to
be at least +1 character higher than the strlen return value of the same
string
2022-08-25 16:31:54 +02:00
LibretroAdmin
5bb3fbab93 Fix mistake in prior commit - should be concatenated to string 2022-08-25 15:17:31 +02:00
LibretroAdmin
6caa139700 (cheevos.c) Fix some function prototypes for C
Rewrite some snprintfs as strlcpy/strlcat/manual assignment - only
use snprintf if we actually need the formatting
2022-08-25 15:08:02 +02:00
LibretroAdmin
f5ac33c0b6 Simplify task_database_cue.c code -
* Was copying pre_game_id into several memory buffers for no real reason,
gets rid of some unnecessary strncpy calls this way too
2022-08-25 07:15:27 +02:00
LibretroAdmin
88187e7ef2 * Start getting rid of strncpy
* steam.c - cleanups:
  * Use string_to_lower from libretro-common/stdstring.c instead of
    its own version
  * Some stylistic changes
  * Rewrite strncpy calls into strlcpy/strlcat/manual assignment
  * Make it C89 compliant
  * Some unused variables
2022-08-25 06:51:39 +02:00
LibretroAdmin
8017410098 task_database_cue_get_token - correct to 'if (rv < 0)' instead 2022-08-25 05:52:42 +02:00
LibretroAdmin
c841e191f7 (task_database_cue.c) Put this conditional back 2022-08-25 05:36:48 +02:00
LibretroAdmin
da13fb0f48 Don't include errno.h in files that don't justify its use 2022-08-25 05:19:30 +02:00
LibretroAdmin
39241699a0 Drop errno dependency in database_cue_get_token - was some legacy
code that is probably not needed
2022-08-25 04:51:00 +02:00
lucasmr
808fc7f389
Refactor task_database_cue.c (#14349) 2022-08-25 04:42:23 +02:00
LibretroAdmin
56a6c50728 (task_database_cue.c) Get rid of some strcmps 2022-08-24 16:32:55 +02:00
LibretroAdmin
c79904f8b3 (task_database_cue.c) More simplifications 2022-08-24 16:21:45 +02:00
LibretroAdmin
f2d8b67f23 (task_database_cue.c) Simplifications:
- unsafe strcpy/strcat/sprintf were used, so pass 'len' parameters
to detect_{system} functions so that we can use the safer strlcpy/strlcat
calls instead
- thanks to strlcat/strlcpy return values, we can do less string concatenations
and get the same results
- some other miscellanous cleanups
2022-08-24 16:08:06 +02:00
LibretroAdmin
fdc563e6f7
Remove errno dep (task_database_cue.c) (#14341)
* (task_database_cue.c) Turn some functions static - some general cleanups

* Start removing errno dependency on task_database_cue.c
2022-08-24 15:15:21 +02:00
LibretroAdmin
6126a86259 Try to avoid sprintf/strcat/strcpy calls as much as possible in
RetroArch codebase
2022-08-24 13:49:05 +02:00
LibretroAdmin
fc861c167c - Get rid of some strerror usage
- Get rid of errno.h include in task_audio_mixer.c
- Rename get_token so it has less chance to conflict with other symbols
2022-08-23 19:58:20 +02:00
LibretroAdmin
c04201927b
Don't make libretrodb dependent on errno anymore (#14340)
* Don't make libretrodb dependent on errno anymore
2022-08-23 19:36:52 +02:00
Jamiras
85c44f9245
more thread-awareness in task callbacks (#14337)
* more thread-awareness in task callbacks
2022-08-23 15:11:11 +02:00
LibretroAdmin
10a351228b * Rewrite some snprintfs
* task_steam.c - add license header
2022-08-20 19:17:28 +02:00
LibretroAdmin
4c4bec11f7 NULL termination already happens in strlcpy 2022-08-10 02:45:27 +02:00
LibretroAdmin
a6e210e9db Get rid of some strlcats 2022-08-08 22:41:32 +02:00
LibretroAdmin
0594df8cce Remove some unused variables 2022-08-04 22:41:17 +02:00
LibretroAdmin
b2634ea588 * Create fill_pathname_join_special - and specify fill_pathname_join
as deprecated.
* Use fill_pathname_join_special in the vast majority of cases where
we can ensure out_path is a new empty string
* Get rid of some extension concatenation with strlcat where encountered
* Some general cleanups with NULL termination of strings that get immediately
passed to strlcpy/strlcpy-adjacent functions
2022-08-04 14:19:38 +02:00
Cthulhu-throwaway
3aa1811ca9
(Network) Add getnameinfo_retro (#14278) 2022-08-04 13:22:49 +02:00
LibretroAdmin
e7f3432e48 Replace some trivial strlcat usage - use return value of preceding
strlcpy then simply append the extension to it at this location
2022-08-04 03:45:09 +02:00
LibretroAdmin
e4bff7c12c Move rjsonwriter helper inline functions over to separate file rjson_helpers.h 2022-08-01 17:41:34 +02:00
LibretroAdmin
f79875536a (libretro-common) Move file_crc32 out of encoding_crc32.c - we don't want file I/O
code in encodings/encoding_crc32.c
2022-08-01 14:04:01 +02:00
Cthulhu-throwaway
20c4407928
Add HAVE_IFINFO macro (#14265) 2022-08-01 07:51:02 +02:00
LibretroAdmin
f711940339 (task_database_cue.c) Use STRLEN_CONST macro for last param to
string_is_equal_fast instead of hardcoded magic numbers - sizeof
is compile-time so should be at no detriment to performance
2022-07-30 18:31:05 +02:00
kikmon
44f5cb2935
Improved success rate of Serial scanning on PS1 by adding support for the xx.xxx format (#14256)
Co-authored-by: papa <papa>
2022-07-30 18:22:04 +02:00
LibretroAdmin
19e4b8c0ca Fix DEBUG codepath 2022-07-30 12:50:59 +02:00
LibretroAdmin
592f9384b0 Silence code analysis warnings by Xcode - unused variables - nothing
done with value set - etc
2022-07-29 08:29:43 +02:00
LibretroAdmin
4afe0c55d5 (autoconfig) Go back to prior behavior 2022-07-28 18:21:06 +02:00
Cthulhu-throwaway
29f0ba2e71
(Network/Vita) Add net_ifinfo support (#14225) 2022-07-26 16:10:23 +01:00
Cthulhu-throwaway
8d4a64ab96
(Netplay) Disallow netplay start when content is not loaded for static core platforms (#14220) 2022-07-26 07:21:57 +02:00
libretroadmin
8ac1a36259 Don't do NULL termination on strings when passing to strlcpy and/or
a file_path function that calls strlcpy under the hood
2022-07-26 07:01:10 +02:00
kikmon
45d78f2a60
[PS1 Serial Scanning] (#14219)
Changed return value of detect_ps1_game function to actuially return a
failure when the Serial couldn't be extracted.
Scanner will then fallback on crc check, and usually ends up finding the
games in the database.

Co-authored-by: papa <papa>
2022-07-25 22:41:32 +02:00
libretroadmin
69a2d124c0 Don't do NULL termination on string if we pass it off to strlcpy
and/or a file_path function that uses strlcpy under the hood
2022-07-24 05:39:51 +02:00
Cthulhu-throwaway
cc7c310aa1
(Netplay) Refactor fork arguments (#14208) 2022-07-24 04:26:50 +02:00
Cthulhu-throwaway
eb36c35ebf
(Netplay) Fix content reload deadlocks on static core platforms #2 (#14202) 2022-07-23 03:08:26 +02:00
Cthulhu-throwaway
09d9366bc0
(Netplay) Fix content reload deadlocks on static core platforms (#14196) 2022-07-22 02:36:24 +02:00
libretroadmin
3cf7e881ec Get rid of unnecessary log spam about non-required/non-essential files/directories 2022-07-21 03:48:11 +02:00
libretroadmin
2cf6f6ce8f * Don't do NULL termination on string if we pass it to strlcpy
* Cleanups in connmanctl.c - abuse of strlcat, strlcpy should
precede it first and/or other more optimal ways of setting the path
2022-07-21 01:47:34 +02:00
libretroadmin
4b5c7856e6 Remove some more explicit NULL-termination when we're calling a
string function that calls strlcpy under the hood
2022-07-19 20:43:12 +02:00
LibretroAdmin
29774f5b7a
Small opts (#14186)
* (joypad_connection) Small optimizations -
* Turn functions static where possible
* Hose strlen call out of loop

* (input_driver.c) General cleanups:
* Some small code/style nits

task_screenshot.c:
* Move widget callback function for screenshots to task_screenshot.c

(file_path.c):
* Turn get_pathname_num_slashes into static function
* path_linked_list_free - always returns true, so get rid of return value
* path_linked_list_new - fix function signature
* path_get_archive_delim - do not NULL-terminate string, already done by strlcpy later on

General:
* Slight optimizations - use int/size_t for loop counter variable instead of unsigned
* Take advantage of fact that strlcpy already NULL-terminates, so don't do this explicitly
outside if we're just going to end up calling strlcpy/fill_pathname_join on it anyway
2022-07-19 10:01:33 +02:00
libretroadmin
c4fb055fdb Cleanups:
* Combine early return and assignment lines
* use path_basename_nocompression when possible
* Move variables to proper scope
2022-07-12 20:44:00 +02:00
libretroadmin
f7194e167f use path_basename_nocompression where it is safe to do so 2022-07-12 19:14:12 +02:00
libretroadmin
b7926605f4 Remove fill_short_pathname_representation 2022-07-11 21:40:09 +02:00
libretroadmin
adf9994828 Deprecate fill_pathname_base_noext 2022-07-11 20:13:44 +02:00
libretroadmin
d706c9c5bf Start deprecating trivial functions in file_path.c 2022-07-11 19:56:46 +02:00
libretroadmin
05fb6fd9a3 task_push_load_content_playlist_from_menu - cleanup error_string 2022-07-09 18:43:44 +02:00
libretroadmin
3b2b4ea49d (task_content.c) Cleanups - remove error_string where not used 2022-07-09 18:41:18 +02:00
libretroadmin
cda235d124 (task_autodetect.c) Cleanups - don't check for variables that
we already know are non-NULL, cleanup variable scope, etc.
2022-07-09 18:08:25 +02:00
libretroadmin
ad87f88b72 (task_pl_thumbnail_download.c) Minor cleanups/style nits - reducing
return paths
2022-07-09 17:13:26 +02:00
libretroadmin
f78f64f6be (task_core_updater) small cleanups -
* Get rid of early returns where not necessary
* Reduce return paths to one where possible
2022-07-09 16:52:43 +02:00
Cthulhu-throwaway
177691e6fa
(Core Info) Ensure current core info is initialized at runloop_event_init_core when netplay is enabled (#14162) 2022-07-09 16:25:27 +02:00
libretroadmin
a9b074fa0a Rewrite content_file_list_init - check return value first before assigning it 2022-07-09 13:32:38 +02:00
libretroadmin
274ce86d89 content_file_list_init - size < 1 will never happen, checked outside
before calling the function
2022-07-09 13:24:01 +02:00
libretroadmin
4d3587a2e8 Cleanups in task_content.c -
split up some code between HAVE_MENU and whatnot
2022-07-09 02:07:34 +02:00
libretroadmin
460ca09c87 (task_http) Cleanups 2022-07-09 01:24:59 +02:00
libretroadmin
fa9e56d824 input_autoconfigure_connect - have boolean return value
- task_autodetect.c - cleanups, try to do less with generic
error labels and gotos, etc.
2022-07-09 00:53:08 +02:00
Cthulhu-throwaway
ef022ffe90
(Netplay) Force a core update when starting netplay (#14157) 2022-07-08 18:20:01 +02:00
libretroadmin
fbd37f8926 Consistency in variable naming conventions - rename temp_path to tmp_path
for uniformity with rest of code
2022-07-05 19:06:38 +02:00
libretroadmin
69605b7c9c (task_screenshot.c) Simplify code 2022-07-05 18:15:12 +02:00
libretroadmin
cd36af1d24 Use NAME_MAX_LENGTH for some char array variables that have a fixed
width of 256
2022-07-03 13:59:23 +02:00
sonninnos
ee8993c76a
Silence Linux snprintf warnings (#14131) 2022-07-02 14:08:27 +02:00
Cthulhu-throwaway
e7b9ff1ff6
(Netplay) Minor tweaks to the find content task (#14125) 2022-07-02 00:24:16 +02:00
Cthulhu-throwaway
ab208fca91
(Netplay) Ensure current content is reloaded before joining a host (#14117) 2022-07-01 01:02:04 +02:00
Cthulhu-throwaway
f2b3948b39
(UPnP) Attempt support for remaining platforms (#14107) 2022-06-26 21:38:52 +02:00
Cthulhu-throwaway
6aa16442db
(Network/Wii) Enable net_ifinfo for some features (#14106) 2022-06-26 16:37:05 +02:00
Cthulhu-throwaway
c1e8925f87
(Netplay) Find content task refactor (#14089) 2022-06-23 14:48:57 +02:00
Cthulhu-throwaway
dabd9cb996
(Netplay/LAN Discovery) Task refactor (#14070) 2022-06-19 03:41:04 +02:00
libretroadmin
60161982b2 (task_database) Simplify code - put logging behind DEBUG ifdef 2022-06-18 19:19:18 +02:00
libretroadmin
8bad1559f9 (task_database_cue.c) strlen returns value of size_t type, change variables
(task_database_cue.c) Comment out log and put it behind DEBUG ifdef
2022-06-18 19:12:03 +02:00
libretroadmin
9c34a83aa7 task_push_load_contentless_from_menu - prevent warning when
compiling without HAVE_DYNAMIC defined
2022-06-10 14:40:06 +02:00
Cthulhu-throwaway
e4f8b531d5 (Netplay) Some refactoring and cleaning 2022-05-27 17:21:34 -03:00
Cthulhu-throwaway
61610bd7d3 (Netplay/UPnP) Stability Issue 2022-05-25 12:30:17 -03:00
Cthulhu-throwaway
f0baf977fa (Network) Move natt files to "network" 2022-05-18 23:23:40 -03:00
Cthulhu-throwaway
796bc15837
C89 buildfix (#13923)
* C89 buildfix

* More buildfixes
2022-05-10 07:37:33 +02:00
Cthulhu-throwaway
1f879b0472
(Netplay/Content Find Task) Ensure CRC32 is 8 characters long (#13887)
Ensure CRC32 is 8 hexadecimal characters long when comparing CRCs with loaded content.
2022-04-25 18:36:59 +02:00
Autechre
f42591305d
Revert "Fix crc32 comparision (#13884)" (#13886)
This reverts commit f377c0d041.
2022-04-25 18:06:04 +02:00
Alexander Trufanov
f377c0d041
Fix crc32 comparision (#13884)
As state->content_crc has "|crc" suffix.
2022-04-25 15:40:25 +02:00
twinaphex
95fad4d32c Cleanups 2022-04-13 15:08:22 +02:00
jdgleaver
1e7265e7aa
Static Platforms: Populate all history list metadata when launching content from playlists (#13822) 2022-04-04 16:33:44 +02:00
Romeo
686628b8ad
(Database) Serial scanning for Wii now includes WBFS (#13816)
* Update task_database.c
2022-04-03 04:08:30 +02:00
Mats
4a1a1e2fa7
(steam) Introduce Steam Rich Presence (#13798) 2022-04-02 08:07:40 +01:00
Autechre
4c3a4d66df
Cxx buildfixes (#13803)
* CXX_BUILD buildfixes
* (D3D11) Buildfixes for CXX_BUILD
* (Linux/qb) Disable KMS for Linux when building for C89, headers use inline which is not
available for C89
2022-03-30 17:30:20 +02:00
twinaphex
a7569b5712 More CXX_BUILD buildfixes 2022-03-30 15:45:48 +02:00
Mats
d675276e28
(steam) Thread safety and style fixes (#13739) 2022-03-13 18:14:20 +01:00
Mats
249241d7cd
(steam) Initial integration with Steam API w/ mist (#13710) 2022-03-09 15:05:07 +01:00
twinaphex
9bcee062ff Cleanups/warnings 2022-03-07 19:32:01 +01:00
twinaphex
460f5e745d Silence some MSVC 2019 code analysis warnings 2022-03-05 14:39:56 +01:00
jdgleaver
9b0cb0fc92
Add 'Standalone Cores' menu (#13655) 2022-02-22 19:23:48 +01:00
Michael Burgardt
7df18ec59d
Improve some texts (#13645) 2022-02-21 20:11:25 +01:00
jdgleaver
42e03cae83
Disable save states based on save state support level defined in core info files (#13562) 2022-02-02 16:49:53 +01:00
Cthulhu-throwaway
c50087efdc
(UPnP) Minor refactor (#13510)
Don't clear up the request at natt_close_port.
2022-01-18 13:03:32 +01:00
Cthulhu-throwaway
1a7e8e6628
(UPnP) Refactor (#13503)
COMMON: The common library can now be used independently by any number of features.
COMMON: The common library no longer restricts HAVE_SOCKET_LEGACY.
Netplay Task: Network interface scoring changed from byte-level to bit-level.
2022-01-17 13:46:03 +01:00
Cthulhu-throwaway
fb2d600837
(Netplay/UPnP) Smart interface selection (#13470)
Find the most suitable address for UPnP by scoring interfaces on how close their address is to the device's address.
2022-01-10 15:52:15 +01:00
Cthulhu-throwaway
c2df109874
(Netplay) LAN addresses only for UPnP (#13461)
Some router devices might accept non-LAN addresses without raising an error.
2022-01-08 10:45:41 +01:00
pkos
a192064403 (Database) Serial scanning for Gamecube/MegaCD/SegaCD/Saturn/PSX/PSP/Dreamcast/Wii 2021-12-31 21:35:16 -05:00
tunip3
fb6bf6023a
Move roms copied to localstate to a dedicated dir and clear on start up [XBOX/UWP] (#13392)
* make roms copy to a specific cache dir in the localstate folder when its copied

* auto delete vfs cache dir on start up

Co-authored-by: Tunip3 <tunip3@users.noreply.github.com>
2021-12-22 12:55:33 +01:00
Cthulhu-throwaway
cda66d09c3
Netplay Stuff - Addendum (#13378)
Prevents long-term pausing from clients dishonoring allow pausing.

Missing crediting.
2021-12-19 20:43:59 +01:00
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
tunip3
6c123dd078
Mitigate need for vfs cores on ntfs drives [UWP/XBOX] (#13368)
* make check for standard io by access rather than the just assuming based on path string

* add code to auto permissions so files can be accessed by non vfs cores
(no exfat or fat32 support yet)

* remove commit from macro because apparently it causes issues

Co-authored-by: Tunip3 <tunip3@users.noreply.github.com>
2021-12-17 13:46:04 +01:00
Tilman M. Jaeschke
682bbab233
[New Feature] Load save states from command-line or playlist (#13354)
* load save states from command-line or playlist

* load save states from command-line or playlist

* removed some brackets
2021-12-14 14:08:06 +01:00
tunip3
62528a483f
Fix roms over 4gb (approx) failing to load, improve copy times, fix scanning for playlists [UWP/XBOX] (#13348)
* Fix scanning for playlists

* Fix issues where games over 4gb (approx) would fail to load and also speed up loading times
2021-12-12 17:29:57 +01:00
Autechre
3b1a1ac8da
Remove miniupnpc dependency (#13340)
* use custom libretro-common UPNP

* Remove miniupnpc
2021-12-09 05:52:42 +01:00
Autechre
fbbe351f7d
UPnP cleanups and refactorings (#13325) 2021-12-04 21:16:34 +01:00
Autechre
a44f5bbf78
Fix UPNP port mapping failed error - switch to a permanent lease time, (#13324)
but request it to be removed when we do netplay_free
2021-12-04 15:45:29 +01:00
Tony
09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
twinaphex
bc6433e0f9 Move menu_content_environment_get to task_content.c 2021-11-23 17:10:52 +01:00
Autechre
5bb4df3a42
Move translation task code to tasks/task_translation.c (#13274) 2021-11-22 15:19:20 +01:00
Autechre
71b30d7846
Split up wifi networking code - move it into separate file (#13262) 2021-11-21 12:37:39 +01:00
twinaphex
86f899c844 Revert "Shorten character arrays that are passed to fill_pathname_base_noext"
This reverts commit 318108ac82.
2021-11-10 08:22:19 +01:00
twinaphex
318108ac82 Shorten character arrays that are passed to fill_pathname_base_noext 2021-11-10 00:09:33 +01:00
twinaphex
619398bbe4 Backport parts of 73c0760236 2021-11-09 23:12:57 +01:00
twinaphex
f671ce4f8c Move global->name to runloop_st 2021-11-09 06:03:00 +01:00
twinaphex
1f4123ba54 Don't include netplay.h header unless we have HAVE_NETWORKING
defined
2021-11-05 19:50:02 +01:00
twinaphex
67c010394d Remove netplay_discovery.h - hopefully fixes other build issues 2021-11-05 19:12:55 +01:00
twinaphex
121174c9af (Discord) Remove stray discord_is_inited global - put it in
discord_state_t instead
2021-11-05 13:45:00 +01:00
twinaphex
d3fd72ba63 Fix header include - should have been relative 2021-11-05 00:09:45 +01:00
Jamiras
088aa7dcb9
add github action for c89 build (#13186)
* add retroarch.yml

* fix c89 errors

* attempt to add dependencies

* update comments
2021-11-05 00:05:13 +01:00
twinaphex
aaad65538c Move rarch_patch_blocked to runloop_state, and get rid of
RARCH_CTL_IS_PATCH_BLOCKED
2021-10-30 11:15:45 +02:00
twinaphex
5477e34815 Move stray globals subsystem_data and subsystem_current_count to
runloop_state
2021-10-29 17:41:31 +02:00
jdgleaver
c67c7c944d
Initialise 'Explore' menu on a background thread (#13162) 2021-10-27 17:51:22 +02:00
twinaphex
9b4636ff62 Fixes --disable-menu 2021-10-15 14:32:07 +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
jdgleaver
40925baacd Enable SRAM for contentless cores 2021-10-14 13:59:23 +01: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
6a4a5ae27c Put scaler_ctx back in screenshot_state 2021-10-02 04:19:46 +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
5ba8843354 Move dispwidget_get_ptr over to gfx_widgets.c 2021-09-30 04:40:15 +02:00
twinaphex
0e9b2179af move scaler object out of screenshot_task_state 2021-09-30 02:19:16 +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
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
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
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
Michael Burgardt
d8db234df0
Concatinate some previously truncated strings for easier translation (#12120) 2021-09-16 19:00:14 +02:00
jdgleaver
6da778b934 (Playlist Manager) Add 'Refresh Playlist' option 2021-09-09 16:18:26 +01: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
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
twinaphex
d07e0da412 Improve HAVE_NETWORKING and HAVE_NETPLAYDISCOVERY ifdefs; remove
unused netplay lan scan rooms function
2021-08-12 16:44:07 +02:00
twinaphex
13a2d2419f (PSL1GHT) Fix function prototype for 'button' pad driver
(Task save) Fix warning in platform port
2021-08-09 20:25:27 +02:00
Jamiras
5ac432026a add helper function for accessing connection method 2021-07-27 21:02:14 -06:00
Jamiras
c9ca0489ed allow concurrent POST requests to same URL 2021-07-23 22:04:42 -06:00
Ash Logan
a35323ace9 (task_http.c) Use 100% as maximum, not minimum
With previous logic, any normal percentage would get MAX'd to 100% 
(max(70, 100) == 100). Correct math to use here is min
2021-07-18 14:47:25 +10:00
Mark W. Kidd
d4fb27a7a9 implement natt fix from void() 2021-07-08 22:52:19 -04:00
Mark W. Kidd
b17dd28ff2 consolidate and comment input_remapping.h 2021-07-06 16:13:43 -04:00
jdgleaver
f7f007519c (Playlist) Optimise scanning of large rom sets 2021-06-29 14:50:19 +01: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
twinaphex
24389bbcd5 Small cleanups to task_content.c 2021-05-21 16:30:02 +02:00
twinaphex
2e50b57643 task_content_disc.c - header include cleanups 2021-05-21 14:10:44 +02:00
jdgleaver
334a43a7c5 Prevent unnecessary extraction (to disk) of compressed content files + task_content.c clean-ups 2021-05-20 17:08:51 +01:00
twinaphex
8291b18771 Small cleanup to cheevos content loading part 2021-05-19 16:05:42 +02:00
twinaphex
181824eb00 (Tasks/content) Split up CDROM code into tasks/task_content_disc.c 2021-05-19 15:53:38 +02:00
Autechre
84ab14cb83
Merge pull request #12281 from eadmaster/multi_patch
added multi-softpatching support + OSD messages for patches (#9947)
2021-04-30 16:00:43 +02:00
eadmaster
019130298a added multi-softpatching support + OSD messages for patches (#9947)
fixed Travis error
2021-04-30 14:12:47 +02:00
jdgleaver
f4511f6fa4 (core_info) Performance optimisations + code clean-ups/refactors 2021-04-26 14:30:31 +01:00
twinaphex
d07043fe26 Reduce size of local char variables 2021-04-11 19:28:59 +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
544a17926b Use path_basename_nocompression where we are sure we are not
dealing with a filename with a compressed archive hash
2021-04-11 17:44:41 +02:00
twinaphex
ed6dd6d6d1 Fix get_thumbnail_paths 2021-03-29 17:42:32 +02:00
twinaphex
cc8160d044 task_pl_thumbnail_download.c - put char string of 8192 length
on heap for all platforms
2021-03-29 09:28:26 +02:00
Autechre
ba7900a3fb
Merge pull request #12173 from crystalct/master
Some PSL1GHT fixes
2021-03-29 09:26:24 +02:00
CrystalCT
b9ff6cb1d9 Some PSL1GHT fixes 2021-03-29 09:01:03 +02:00
twinaphex
b5d4c5b041 Silence -Wsizeof-pointer-memaccess warnings pointed out here -
https://travis-ci.org/github/libretro/RetroArch/jobs/764003625
2021-03-22 23:43:11 +01:00
twinaphex
55ba377153 (task_database.c) Don't call path_contains_compressed_file multiple
times
2021-03-22 20:14:58 +01:00
twinaphex
f22b077887 (task_database.c) Optimizations:
- strlen was being called on path for each loop iteration, when
path is not subject to change - do it once outside
- String copying was being performed even when the string would
equal a string not subject to change
2021-03-22 19:24:14 +01:00
twinaphex
81e768435b CXX_BUILD buildfix 2021-03-22 15:01:57 +01:00
twinaphex
6cc51fa5f5 task_load_handler - small cleanups 2021-03-17 10:40:47 +01:00
twinaphex
7e2113b405 (task_save.c) Allocate the string on heap instead of putting it on stack 2021-03-17 10:12:04 +01:00
Autechre
be7dd98939
Merge pull request #12167 from crystalct/master
Add some PSL1GHT ifdefs
2021-03-17 09:53:57 +01:00
CrystalCT
9ac61f9cc5 Add some PSL1GHT ifdefs 2021-03-17 08:46:02 +01:00
Autechre
e62aabea95
Merge pull request #12157 from Jamiras/task_http_cleanup
have http tasks clean up after themselves
2021-03-16 09:06:58 +01:00
Jamiras
501fe45a9f have http tasks clean up after themselves 2021-03-15 19:42:25 -06:00
Jamiras
ba1d48fb6a ensure hardcore remains disabled through load process 2021-02-28 13:07:24 -07:00
Jamiras
1e39de800c
fix undo load state (#12062) 2021-02-21 22:50:27 +01:00
Jamiras
2280d126f3 address feedback 2021-02-18 07:44:52 -07:00
Jamiras
2d841715cb include achievement runtime state in save states 2021-02-17 19:44:39 -07:00
twinaphex
68027c606e Silence some warnings 2021-02-09 16:43:40 +01:00
twinaphex
da17588f0c CXX_BUILD build fixes 2021-02-08 09:35:57 +01:00
sonninnos
90485b5586 Savestate logging cleanup 2021-02-03 13:29:32 +02:00
Jamiras
015576b2ba
improve error handling for achievement unlocks (#11916) 2021-01-21 04:07:48 +01:00
Autechre
47784c66f0
MSVC Buildfix - (#11913)
* Declare variables at the top of a function in C code
2021-01-21 02:59:14 +01:00
twinaphex
357b7d68f6 (libretro-common) Rename rhash to lrc_hash
(rcheevos) Rename rhash to rc_hash
2020-12-28 19:55:54 +01:00
twinaphex
870707dbe8 Remove obsolete __CELLOS_LV2__ references - use PSL1GHT instead 2020-12-19 15:32:26 +01:00
David Guillen Fandos
8b88f705b8 Fix minor issues and a memleak 2020-12-10 19:24:34 +01:00
David Guillen Fandos
ed7b3aa415 Add a proper WiFi menu, with Enable/Disable & Disconnect options
This also allows WiFi passwords to be remembered. The underlying
tool (connman) allows to store passswords (that's why it auto connects
whenever you boot a Lakka device), so we expose this so that the user
does not have to re-input the pass when connecting to a saved wifi.

Option to forget a password to come in a future PR, for now a password
is automatically forgotten if the Wifi connect operation fails (we assume
it fails due to password).

Changes the WiFi API to enable these features of course!
2020-12-09 20:20:48 +01:00
twinaphex
9ee1e33e09 Only attempt to call dir_check_defaults once per runtime session
when calling the frontend environment get callback - we want to
look at the 'default' directories, and then if they don't yet exist,
auto-create them so we can store files in them.
2020-11-19 07:10:22 +01:00
twinaphex
c8f92d2247 Revert "(UWP/Small stack size platforms) UWP is short on stack size, these"
This reverts commit 0a3306a7b4.
2020-11-18 16:48:31 +01:00
twinaphex
0a3306a7b4 (UWP/Small stack size platforms) UWP is short on stack size, these
big local char array variables were causing crashes - put them on
heap
2020-11-17 07:17:32 +01:00
jdgleaver
54ce950591 Fix database scans 2020-11-09 14:31:53 +00:00
twinaphex
e58cb34970 Remove ifdef and make this the default for now - and add TODO/FIXME note 2020-11-08 18:31:12 +01:00
unknown
be6d1841d5 fix segmentation fault on PS3 when scan directory 2020-11-08 16:06:00 +01:00
unknown
26559d635e fix segmentation faulf on PS3 when Load State 2020-11-07 01:42:58 +01:00
twinaphex
44b7234756 Move cheat_manager and state_manager to root folder 2020-10-15 05:29:20 +02:00
Tony Jansson
6918b4b5cb Savestate logging cleanup 2020-10-15 03:54:53 +03:00
twinaphex
81fc3a1361 Cleanups 2020-10-10 18:10:22 +02:00
twinaphex
cb45f08db8 Cleanups 2020-10-10 18:02:02 +02:00
twinaphex
e16dd186b7 Cleanups 2020-10-10 17:58:32 +02:00
twinaphex
be47a72af5 Cleanups 2020-10-10 17:55:06 +02:00
twinaphex
c744baeb89 Add ctype variants to stdstring and use it in RA 2020-09-27 22:15:32 +02:00
twinaphex
8ff4134a76 Cleanup 2020-09-20 00:17:11 +02:00
jdgleaver
8a5ebbf24d Add option to scale overlays automatically (with aspect ratio correction) 2020-09-17 17:23:07 +01:00
Justin Weiss
fb9aa961b7 [3DS] Increase file buffer size and savestate chunk size 2020-09-09 18:29:47 -07:00
jdgleaver
b8ea4fd54e Overlay configuration improvements 2020-09-08 13:37:51 +01:00
twinaphex
400df12c1e Start using error_enum 2020-09-03 04:10:37 +02:00
Autechre
b7fff53d16
Merge pull request #11272 from jdgleaver/play-feature-delivery-switch
(Android/Play Store Builds) Add option to switch all installed cores to Play Store versions
2020-09-03 01:55:39 +02:00
twinaphex
e09f1d65b5 Cleanups 2020-09-03 00:44:22 +02:00
twinaphex
e2bd3d75bc Cleanup 2020-09-03 00:38:19 +02:00
jdgleaver
bd80f02f11 (Android/Play Store Builds) Add option to switch all installed cores to Play Store versions 2020-09-02 17:13:03 +01:00
Autechre
6fe1f97fc8
Merge pull request #11255 from jdgleaver/play-feature-delivery
(Android/Play Store) Add frontend support for core installation via Play Feature Delivery
2020-08-29 04:31:20 +02:00