11955 Commits

Author SHA1 Message Date
LibretroAdmin
8b3e5b66bc Silence warning 2022-08-27 18:18:43 +02:00
LibretroAdmin
86c22742b3 (libnx/lakka switch) Another buildfix 2022-08-27 18:13:53 +02:00
LibretroAdmin
ee672bf785 Buildfixes for libnx/lakka switch 2022-08-27 17:56:10 +02:00
LibretroAdmin
b4f0b2827f Remove another unused variable warning 2022-08-27 17:53:43 +02:00
LibretroAdmin
fabccce437 Silence some unused variable warnings 2022-08-27 17:52:19 +02:00
LibretroAdmin
f1ff92c881 * menu_entries_append and menu_entries_append_enum are now combined into
one - if you set the last parameter to a valid 'rarch_setting_t' pointer
and enum_msg to MSG_UNKNOWN, you will get the previous menu_entries_append
behavior
* Renamed remaining function to menu_entries_append so that we have one
consistent way of adding menu entries instead of two
Reduces some code duplication significantly
2022-08-27 17:40:52 +02:00
LibretroAdmin
25b76fdb54 input_keyboard_osk_event_append and others: don't call strlen
implicitly, always leave it up to caller
font_driver_get_message_width - try to avoid scenario where 'len'
is 0
2022-08-27 15:13:56 +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
b200ab6f8f Simplify code, and no longer have to deal with GCC suppression of warnings 2022-08-27 09:07:55 +02:00
LibretroAdmin
388183d971 (menu_displaylist)
* Don't attempt to call msg_hash_to_str in a loop, cache it once outside
inside a local variable
* Do away with some spurious snprintf usage for RGUI (truncation does not matter
as pointed out by jdgleaver, so we needn't be concerned)
2022-08-27 09:02:43 +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
c3a1c578b6 Prefer to use string_starts_with_size/string_ends_with_size (less strlen
calls)
2022-08-26 17:27:55 +02:00
sonninnos
1f048dd358
(XMB+Ozone) Core option category icon refinements (#14354) 2022-08-26 16:11:36 +02:00
sonninnos
de67f174bf
(XMB) Fix icons in 'Load Content' Favorites (#14353) 2022-08-26 08:35:12 +02:00
LibretroAdmin
9535c5c0ad Optimize menu_displaylist_parse_core_options_dropdown_list:
* Hose val_d snprintf outside of loop
* Make it smaller
2022-08-26 00:02:04 +02:00
LibretroAdmin
d67cb22c7f (menu_setting.c) Replace trivial usage of snprintf with strlcpy (where it only printed a
string and nothing else, or similar simple usage)
2022-08-25 19:56:44 +02:00
LibretroAdmin
625e63c3cc Simplify DEFAULT_FILL_TITLE_MACRO 2022-08-25 16:42:46 +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
15fe258c1b Reduce snprintf calls 2022-08-25 13:03:08 +02:00
sonninnos
8fd0961c9a
Show playlist entry as 'Quick Menu' header title (#14350) 2022-08-25 04:41:14 +02:00
LibretroAdmin
72cc98e9bd Remove unused variables 2022-08-24 17:42:01 +02:00
LibretroAdmin
2bc723bb4b (Menu) Move duplicate code is_running_quickmenu to menu_driver.c 2022-08-24 13:28:53 +02:00
LibretroAdmin
a147cb09d9 Get rid of duplicate code - move function to menu_driver.c and have
both XMB and Ozone use it
2022-08-24 13:14:55 +02:00
sonninnos
5f7d14966c
(Ozone+XMB) Fullscreen thumbnail browsing (#14342) 2022-08-24 12:35:54 +02:00
LibretroAdmin
e769436876 (word wrap functions in stdstring.c) Avoid implicit strlens, caller
should pass the 'length' to the function instead
2022-08-23 17:06:01 +02:00
LibretroAdmin
6f738d4fbd Gradually get rid of strcpy_literal
Reasons:
1 - Just a macro for strcpy
1.2 - doesn't have a return type unlike strlcpy, can't be used
for string concatenation
1.3 - unsafe compared to strlcpy

Do either manual string assignment per character or strlcpy, no
inbetween by resorting to strcpy
2022-08-23 15:04:47 +02:00
Cthulhu-throwaway
1a1db6177d
(Netplay) Fix lobby sublabel CRC display on some platforms (#14338) 2022-08-22 23:05:13 +02:00
sonninnos
c818024bc6
(RGUI) Savestate thumbnails (#14326) 2022-08-18 02:12:50 +02:00
MrHuu
46bafd6e46
(3DS) Add bottom menu options (#14323) 2022-08-17 08:23:07 +02:00
Cthulhu-throwaway
c180560165
(Netplay) Improve check frames menu entry (#14320) 2022-08-13 22:28:43 +02:00
Cthulhu-throwaway
908667d97a
(Netplay) Removal of older unused code (#14312) 2022-08-11 23:17:33 +02:00
LibretroAdmin
a6e210e9db Get rid of some strlcats 2022-08-08 22:41:32 +02:00
Cthulhu-throwaway
c030e1c5dc
(Netplay) Support for customizing chat colors (#14305) 2022-08-08 20:09:06 +02:00
LibretroAdmin
a9157f975e
String cleanups (#14304)
(retroarch.c) retroarch_get_capabilities - get rid of strlcat
party in RARCH_CAPABILITIES_CPU, do simple manual assignment for
concatenation instead and NULL terminate at the end
(menu_displaylist.c) Do something about some of the unnecessarily huge
local strings of PATH_MAX_LENGTH size (can be as large as 8192)
(menu_displaylist.c) Replace some trivial strlcats / snprintfs
(D3D10/D3D11/D3D12) Strings don't need to be initialized -
strlcpy already null-terminates - get rid of some constants
2022-08-08 19:11:15 +02:00
LibretroAdmin
0edbe945b4 (MaterialUI/XMB) Optimize refreshing of playlists 2022-08-06 20:32:19 +02:00
LibretroAdmin
1b43e60c7c (Ozone) Use less path_remove_extension and work more with return values
from file_path.c functions
(menu_cbs_title) Small optimization to string concatenation
2022-08-06 19:51:00 +02:00
LibretroAdmin
c7786a45e1 Create path_get_extension_mutable and use it in menu_explore function
for trivial extension replacement in string
2022-08-06 19:06:31 +02:00
LibretroAdmin
94ed25be56
Cleanups (#14296)
- (database_info.c) Optimizations for database_info_build_query_enum() -
 it would call strlcat at the very least 3 times, normally more than that.
 Every strlcat call is at least one or more strlens. Reduce it all down
 to manual string concatenation and one strlcat
- (database_info_build_query_enum) - always NULL terminates string so no need for NULL termination done by callee
* (menu_displaylist) use smaller strings for basename paths, remove one unnecessary string
in menu_displaylist.c function
- (disk_index_file.c) Avoid another trivial string concatenation by doing
it manually after fill_pathname_join_special
- (fill_pathname_join_delim) since fill_pathname_join_delim() now has a return value, use it for 
string concatenation
- (platform_unix) - Use BUFSIZ as size for a buffer in system_property_get
- some other trivial strlcat usage replacements
2022-08-06 18:04:40 +02:00
LibretroAdmin
5739c537a2 Some CXX_BUILD fixes 2022-08-05 17:40:06 +02:00
TheRhysWyrill
9d939a35d6
Add Daite XMB Icon Theme (#14263) 2022-08-05 04:27:34 +02:00
LibretroAdmin
67c23aec0e (Wayland) Stub out unused variables for now
(menu_contentless_cores) Fix mistake - needed to set len to return
value of fill_pathname_join_special
(configuration.c) Fix some unused variable warnings on Linux
2022-08-04 16:19:50 +02:00
LibretroAdmin
6ad88b080e Turn these two fill_pathname_join_delim() calls into plain strlcat() 2022-08-04 15:15:27 +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
LibretroAdmin
88bc26da4e Replace some more trivial strlcat calls 2022-08-04 04:05:27 +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
02df727cb2 Avoid strtof() since it's C99/POSIX. Go for strtod followed by float
cast since it should be almost identical
2022-08-03 14:07:32 +02:00
LibretroAdmin
6dd52d9bb1 Get rid of more boilerplate code in file_path_special.c 2022-08-02 18:05:51 +02:00
LibretroAdmin
556e6702ef Start downscaling on file_path_special.c 2022-08-02 17:54:38 +02:00
LibretroAdmin
70ca20fbf9 (MaterialUI) Fix earlier mistakes made (cd04f770b9a5b6d35df67ff38d89694cee561750) -
we need two separate icon paths cached - one for MaterialUI and one for Ozone (the system
icons)x
2022-08-02 17:25:52 +02:00
Cthulhu-throwaway
8105688a99
(Netplay) Show client slowdown information (#14272) 2022-08-02 13:31:55 +02:00