156 Commits

Author SHA1 Message Date
LibretroAdmin
b4cf279b80 Fix gdi_find_track prototype 2024-12-30 10:13:05 +01:00
LibretroAdmin
56c63b8c19 Small cleanups - conventionalize char *s, size_t parameter usage 2024-12-30 09:44:40 +01:00
LibretroAdmin
3e6486db2b Small cleanups (Task_database_cue.c) 2024-12-29 00:25:22 +01:00
libretroadmin
99c7e08445 Don't use string_trim_whitespace 2024-12-23 00:51:01 +01:00
Viačasłaŭ
3019b926c2
Fix typos (#17068) 2024-10-01 17:36:33 -07:00
libretroadmin
b8391e233f * PATH_MAX_LENGTH redefined from 4096 to 2048
* Massive reduction in heap space allocation, going from settings struct
264kb to 119Kb
* Use NAME_MAX_LENGTH for base paths/names, etc
* Use DIR_MAX_LENGTH for directory sizes
2024-09-09 05:47:32 +02:00
libretroadmin
a6c82df0fd (task_database) Use size_t for size to prevent narrowing issue 2024-05-24 03:33:20 +02:00
libretroadmin
bd090dea71 Replace more strlcat calls 2023-07-16 18:07:49 +02:00
libretroadmin
c92d7d3071 (task_database_cue.c) Simplifications 2023-06-20 20:07:44 +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
kikmon
d446f39c63
[PS1 Scanning] Serial extraction is now considered a failure if PSX.EXE is found, allowing CRC fallback and actually fixing the game scanning (#15241)
Co-authored-by: papa <anonymous>
2023-04-30 23:36:50 +02:00
libretroadmin
04f510d503 Cleanup header includes 2022-12-05 15:10:19 +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
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
LibretroAdmin
003cea5d42 Fix some 'implicit conversion loses precision' warnings 2022-09-01 15:15:48 +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
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
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
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
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
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
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
twinaphex
95fad4d32c Cleanups 2022-04-13 15:08:22 +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
twinaphex
9bcee062ff Cleanups/warnings 2022-03-07 19:32:01 +01:00
pkos
a192064403 (Database) Serial scanning for Gamecube/MegaCD/SegaCD/Saturn/PSX/PSP/Dreamcast/Wii 2021-12-31 21:35:16 -05:00
twinaphex
c744baeb89 Add ctype variants to stdstring and use it in RA 2020-09-27 22:15:32 +02:00
twinaphex
143224e09a (task_database_cue) Don't use malloc 2020-08-26 19:46:13 +02:00
twinaphex
624a70f062 More strings being moved from heap to stack 2020-08-18 14:47:57 +02:00
twinaphex
1aceac6edb Struct reorders 2020-08-14 18:51:50 +02:00
twinaphex
f162875583 (PSP scanning) Add more PSP serials 2020-07-29 15:41:05 +02:00
twinaphex
784e1187e1 (PSP scanning) Regression fix - should scan games with serial ULU again 2020-07-29 15:29:51 +02:00
twinaphex
1ae20ea17c Style nits - turn macro names into upper-case - some while style nits 2020-06-26 20:00:19 +02:00
twinaphex
601a73fa8b Use string_starts_with_size where possible - avoids the strlen 2020-06-25 12:51:04 +02:00
twinaphex
a2184bcd07 (task database) optimize detect_psp_game 2020-06-11 02:39:07 +02:00
twinaphex
8eee7b3bb9 (Task database) Cleanups 2020-06-10 16:24:52 +02:00
Vladimir Serbinenko
1fcdddf579 Remove manual MSB_FIRST definitions and switch to retro_endianness.h 2020-04-21 04:16:55 +02:00
Rob Loach
7403b3de8a
(Database) Add support for scanning PSP Korean
This adds support for scanning PlayStation Portable Korean region.

Found by @pkos, and fixes #10268
2020-03-12 21:19:32 -04:00