Commit Graph

34 Commits

Author SHA1 Message Date
pstef 59c71b8db4 Rewrite part of cheat_manager_load_cb_second_pass()
This is to silence a stringop warning that I believe to be a false
positive.  Nevertheless, this change reduces verbosity of the code
and introduces a couple of checks that weren't there previously.

Note that the base parameter of this strtoul call is changed from 0
to 10, because previously the while loop rejected characters other
than 0-9 so strtoul didn't have to. Now that the loop is gone, the
call has to reject characters that are not decimal digits to keep
the logic as it was.
2025-04-08 06:16:59 +00:00
LibretroAdmin ef7b9830db (cheat_manager) No more dependency on configuration.h 2025-02-10 16:48:56 +01:00
LibretroAdmin ddd7ff2d33 get rid of some settings_t pointer passing 2025-02-10 15:47:18 +01:00
LibretroAdmin 91aa8034b1 Style nits/conventions 2025-02-09 16:43:51 +01:00
BinBashBanana ed1810de86
Emscripten improvements (#17422) 2025-01-29 05:29:16 +01:00
LibretroAdmin 0b329018ee Less string buffers and less string copies 2025-01-16 23:59:22 +01:00
LibretroAdmin 7e7224196a Avoid some strlens, and also return size_t in more string
modification functions
2025-01-12 23:39:29 +01:00
LibretroAdmin 1e656261b0 Local len variables need to have '_' prefix 2024-12-30 14:03:58 +01:00
LibretroAdmin 18c85b5ccd Cleanups -
* Less string copies
* Some general cleanups
* Add extra param to runloop_message_queue_push so we can pass size_t
of the message
* Consistent conventions for local variable usage for certain things
2024-12-27 15:13:45 +01:00
libretroadmin 9efb498bde (config_file) Use flags 2024-09-08 18:12:12 +02:00
libretroadmin a4212061d4 Cleanup some unused variables 2024-04-06 20:12:15 +02:00
libretroadmin 89376e3c41 Do away with one temp buffer 2023-09-06 02:50:56 +02:00
libretroadmin cd8fffe5d3 Rename all local variables for retro_system_info to sysinfo 2023-07-15 07:45:20 +02:00
libretroadmin d514f1ded3 Avoid false positives with code analysis tools - rename
variables called 'system'
2023-07-05 03:29:49 +02:00
libretroadmin bdc398d79f - Safer code - use strlcpy where possible instead of manual character
assignments for strings longer than 2 chars
- Use strlcpy concatenation instead of strlcat
- Make sure that what remains of iteration of the '_len' variable
for manual char assignment
is done in a safer way so mistakes are less possible
2023-06-20 16:33:55 +02:00
libretroadmin 631301b3f7 * Cut down on strlcat calls when possible and replace them with clever
usage of strlcpy (when position/offset of previous strlcpy/snprintf call
is known. strlcat implementation in libretro-common makes implicit strlen
call, using strlcpy avoids this
* Reduce a bunch of local char variables by use of said clever usage,
should save up on local stack size usage
2023-06-18 12:06:12 +02:00
libretroadmin 8c9c9b3845 Localize string and other cleanups 2023-05-28 23:48:26 +02:00
Bernhard Schelling 18f79a8a8d Allow RETRO_ENVIRONMENT_SET_MEMORY_MAPS also after core startup
Change the comment in libretro.h about the removed limit and handle the environment call during core runtime in RetroArch.
2023-05-28 05:23:12 +02:00
libretroadmin 91ea92e50b Get rid of some menu_driver_ctl commands 2023-05-10 21:30:09 +02:00
Bobby Smith 440264778d
Fix incorrect lines in .cht files for 'cheat10' and above (#14436) 2022-09-25 17:15:07 +02:00
LibretroAdmin f3c13cf669 * (cheat_manager_save) Reduce amount of snprintf calls from 4 to 1 2022-08-26 23:35:45 +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 8f37c2e3c2 Don't call config_set_bool, call config_set_string directly 2022-07-18 01:59:32 +02:00
libretroadmin d706c9c5bf Start deprecating trivial functions in file_path.c 2022-07-11 19:56:46 +02:00
twinaphex 460f5e745d Silence some MSVC 2019 code analysis warnings 2022-03-05 14:39:56 +01:00
twinaphex f671ce4f8c Move global->name to runloop_st 2021-11-09 06:03:00 +01:00
twinaphex 83ce4259a0 Have only one getter for runloop_state 2021-09-21 19:08:26 +02:00
Mark W. Kidd 5f834a8cb3 input_driver refactor 2021-08-19 20:02:39 -04:00
Autechre ae327a769b
Revert "input refactoring: create input_driver.c" 2021-08-18 18:45:53 +02:00
Mark W. Kidd 5a8920c862 input_driver refactor 2021-08-17 08:56:29 -04:00
sonninnos 2ebf46e241 Silence unappropriate cheatfile logging 2021-04-23 18:44:02 +03:00
twinaphex fc5b557a10 use fill_pathname_join_concat if we want to set a filename path
with extension instead of doing fill_pathname_join and then
fill_pathname_noext
2021-04-11 18:37:42 +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 44b7234756 Move cheat_manager and state_manager to root folder 2020-10-15 05:29:20 +02:00