10956 Commits

Author SHA1 Message Date
LibretroAdmin
0c7408ee16 (EGL) Buildfix 2022-08-27 15:43:16 +02:00
LibretroAdmin
bbf93812a5 (EGL) Turn some EGL functions static 2022-08-27 15:35:08 +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
f34f4d060c (video_shader_get_type_from_ext) remove strlen call 2022-08-27 14:29:37 +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
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
a47ccd81ed (video_shader_parse.c) Don't keep recreating formatted_num unnecessarily
when we already have it
2022-08-26 16:37:24 +02:00
LibretroAdmin
205b9f862f (CTR) Buildfix/ fix typo 2022-08-26 11:49:27 +02:00
LibretroAdmin
29caa95f7e (platform_unix.c) Use safer 'fill_pathname_join_special' for assembling
file path names instead of snprintf
(ctr_gfx.c) Use strlcpy instead of snprintf where possible
(ctr_gfx.c) Use snprintf instead of sprintf where possible
(ctr_gfx.c) Some general style nits
2022-08-26 10:43:42 +02:00
LibretroAdmin
1b181185c2 Simplify override_shader_values - entry variable never used 2022-08-25 08:51:55 +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
da13fb0f48 Don't include errno.h in files that don't justify its use 2022-08-25 05:19:30 +02:00
Cthulhu-throwaway
e45958b25a
(Network) Get rid of the timeout_enable parameter for socket_connect (#14351) 2022-08-25 04:40:19 +02:00
LibretroAdmin
d969facdb4 C89_BUILD buildfix 2022-08-23 19:23:53 +02:00
LibretroAdmin
c22c69e792 (gfx_animation.c) Simplify build_line_ticker_string 2022-08-23 18:26:49 +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
Jamiras
85c44f9245
more thread-awareness in task callbacks (#14337)
* more thread-awareness in task callbacks
2022-08-23 15:11:11 +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
LibretroAdmin
e87db6f0a2 utf8cpy already does NULL termination 2022-08-23 07:52:03 +02:00
LibretroAdmin
f5e5a1b201 strlcpy already does NULL termination 2022-08-22 12:22:54 +02:00
LibretroAdmin
23b06dca69 (video_shader_parse) reduce amount of snprintfs - create
formatted number once then keep appending it to strings
2022-08-20 17:56:19 +02:00
MrHuu
46bafd6e46
(3DS) Add bottom menu options (#14323) 2022-08-17 08:23:07 +02:00
Giovanni Cascione
093432d6c4
mali_fbdev: fix assertion failed on video threaded switch (#14316)
* mali_fbdev: fix assertion failed on video thread switch

* mali_fbdev: added fallback to get refresh rate currently set
2022-08-16 22:13:43 +02:00
LibretroAdmin
59866ddac6 (video_shader_parse.c) Safer code 2022-08-12 22:09:33 +02:00
hunterk
b793169638
add credits to Cyber for their NTSC presets (#14315) 2022-08-12 07:31:46 +02:00
LibretroAdmin
a6e210e9db Get rid of some strlcats 2022-08-08 22:41:32 +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
ba8cc5f381 Cut down on some of the strlcats 2022-08-07 00:28:13 +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
Tatsuya79
72b4cf914e
Rename video filters (#14293) 2022-08-06 13:05:01 +02:00
LibretroAdmin
5739c537a2 Some CXX_BUILD fixes 2022-08-05 17:40:06 +02:00
LibretroAdmin
72a7b3ce07 (X11) Turn these two functions static 2022-08-05 02:00:09 +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
CyberLabSystems
993aaee716
Adding CyberLab custom Blargg NTSC Filter Presets (#14231)
CyberLab custom Blargg NTSC Filter Presets offer improved dedithering with less scrolling, shimmering and other artifacts than current core included Blargg NTSC Filter implementations.

They also work properly with several cores that would otherwise result in a squished image if using the Blargg NTSC SNES filters currently available in the Video Filters folder.
2022-08-04 15:44:47 +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
32314eddaf (video_crt_switch.c) Get rid of unnecessary strlen 2022-08-04 00:10:19 +02:00
LibretroAdmin
ec4c15e8e4 (gfx_widget_load_content_animation) Cleanups - one strlen instead of two,
NULL termination of some strings is not necessary since it gets passed to
strlcpy and/or fill_pathname_join anyway
2022-08-04 00:00:21 +02:00
LibretroAdmin
819337d5d4 video_shader_get_type_from_ext - get rid of unnecessary strlen 2022-08-03 23:35:16 +02:00
LibretroAdmin
6dd52d9bb1 Get rid of more boilerplate code in file_path_special.c 2022-08-02 18:05:51 +02:00
LibretroAdmin
7a993a5951
Count amount of characters window title has so that we can (#14274)
return the value when calling video_driver_get_window_title -
this is so we can prevent strlen calls in x11_common.c
2022-08-02 17:00:33 +02:00
LibretroAdmin
3c7fa43f29 (Windows/Linux) Fix windows title regressions 2022-08-02 16:35:50 +02:00
LibretroAdmin
9d66e2d5e1 General cleanups -
* struct was erroneously named 'catagory' - changed to 'category'
* Removed some strlcpys that were just setting the string to a fixed constant value
* Random nits
2022-08-01 21:31:45 +02:00
LibretroAdmin
f472e4d0de (gfx_widgets) Call fill_pathname_application_special outside of hot functions
(gfx widgets) Pre-assemble and store paths that are not subject to change
2022-08-01 02:07:36 +02:00
LibretroAdmin
fdd5940951 (Font driver) render_msg function was sometimes doing two strlen
calculations instead of just one. NOTE/TODO/FIXME - see opportunity
to optimize this further
2022-07-31 12:59:50 +02:00
Cthulhu-throwaway
9b10579a54
(Network) Fix getaddrinfo_retro (#14261) 2022-07-31 11:22:28 +02:00
kikmon
afd463be16
added make clean between Release and Debug build (#14262)
Co-authored-by: papa <papa>
2022-07-31 11:22:04 +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
88c2ae9ddf No null termination for strings passed to strlcpy/srlcat 2022-07-26 13:23:28 +02:00