1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 20:25:47 +00:00
Commit Graph

44 Commits

Author SHA1 Message Date
libretroadmin
3e85a17d7a iFix warnings picked up by -fanalyzer 2024-05-23 23:50:23 +02:00
libretroadmin
71edae5955 Fix unused function warning 2024-01-25 16:04:11 +01:00
Jesse Talavera
17c9227a9c
Fix the build when XDelta is enabled on certain platforms (#15968)
* Rename the `MIN_MATCH` defined by xdelta3 to `XD3_MIN_MATCH`

- zlib defines its own macro by that name, but with a different value

* Don't redefine `SIZEOF_ARRAY` in xdelta3 if it already exists

* Don't define ssize_t in xdelta3, rely on libretro's definition instead

* Enable xdelta3 support in MSVC 2015-2019

* Fix some invalid MSBuild condition syntax

* Always build xdelta with XD3_USE_LARGESIZET as 1

* Fix an `#if` in task_patch.c

* Enable `HAVE_XDELTA` in the UWP build

* First crack at fixing Xdelta support for Android
2023-12-05 08:32:16 -08:00
Jesse Talavera-Greenberg
cbf49a0b77
XDelta patch support (Take 2) (#15915)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* Add some enums that were excluded by the cherry-pick

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Reintegrate xdelta support

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword

* Slight cleanups

* Remove a stray comma that was hindering C89 builds

* Add XDelta support to CHANGES.md

* Change how the xdelta patch's name is computed

- To be in line with other recent refactoring

* Fix an incorrect merge

- Whoops, this part was from before I figured out how to get the size of a patched file

* Explain the song-and-dance behind computing a patched file's size

* Define some XDelta3-related constants to 0 on 32-bit platforms

* Adjust some Xdelta-related macro definitions

- Exclude the encoder, since we're not making patches
- Move some #defines to after inclusion of <stdint.h>, to fix undefined behavior
- Remove _WIN32_WINNT overrides, since they were for code that we're not using

* Fix Xdelta support

* Wrap an encoder-only function in `#if XD3_ENCODER`
2023-11-23 20:19:07 -08:00
LibretroAdmin
f5133d8cc4
Revert "Add Xdelta support for softpatching (#14706)" (#14743)
This reverts commit aaad220836.
2022-12-19 03:29:46 +01:00
libretroadmin
7a4a860680 Revert "Don't rely on ENOSPC - relies on errno.h"
This reverts commit f6c2e4d292.
2022-12-19 03:22:07 +01:00
libretroadmin
f6c2e4d292 Don't rely on ENOSPC - relies on errno.h 2022-12-19 03:17:09 +01:00
Jesse Talavera-Greenberg
aaad220836
Add Xdelta support for softpatching (#14706)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Remove trailing commas from the enums I modified

- C89 doesn't allow them

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Add some RARCH_DBG calls for xdelta patching

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword
2022-12-19 01:10:04 +01:00
libretroadmin
04f510d503 Cleanup header includes 2022-12-05 15:10:19 +01:00
LibretroAdmin
4c4bec11f7 NULL termination already happens in strlcpy 2022-08-10 02:45:27 +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
f7194e167f use path_basename_nocompression where it is safe to do so 2022-07-12 19:14:12 +02:00
Tony
09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
eadmaster
019130298a added multi-softpatching support + OSD messages for patches (#9947)
fixed Travis error
2021-04-30 14:12:47 +02:00
twinaphex
68027c606e Silence some warnings 2021-02-09 16:43:40 +01:00
twinaphex
87c0fb6323 Struct reordering 2020-08-14 18:58:09 +02:00
twinaphex
9ae4031d13 Cleanups 2020-03-07 19:14:45 +01:00
twinaphex
64c515bac4 Turn while (true) into for (;;) for easier MSVC backwards compatibility 2020-02-01 04:15:22 +01:00
twinaphex
60faeffde0 (task_patch.c) Cleanups 2020-01-20 04:44:45 +01:00
twinaphex
481f31fe8f Turn task_patch.c into separately compiled file 2020-01-20 04:31:32 +01:00
brenodantas10
0ab26a1371 Soft-Patch any IPS size (put declarations at beginning) 2019-09-01 18:44:21 -03:00
brenodantas10
49032ae2f2 Soft-Patch any IPS size 2019-09-01 16:01:48 -03:00
brenodantas10
33c681c0c7 Fix IPS Patch, still without re-allocation 2019-08-28 01:52:26 -03:00
Breno Dantas Mendonça
be493daf72
Update task_patch.c
Fix IPS Patch, still without reallocation
2019-08-28 01:39:15 -03:00
brenodantas10
a099812f6e (bps/ups)_apply_patch - Re-allocation target_data variable for target patch size (can now apply bigger patches without extra-bytes on memory) 2019-08-24 00:06:34 -03:00
twinaphex
717c5c1e2f Delayed CRC calculation for need_fullpath ROM loading (unpatched) -
we can get rid of the GEKKO ifdef for Gamecube/Wii since CRC
calculation for these kind of games will now be delayed until
content_get_rom_crc is called the first time, which typically only
happens during netplay
2019-06-03 18:51:04 +02:00
twinaphex
627c86721f (task_patch) Get rid of extraneous filestream_exists checks -
we already check if the file exists with path_is_valid
2019-04-27 13:35:28 +02:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
retro-wertz
ce27e986e9
Better no log at all than showing a false log
This false message has been like foreve. Nobody seems interested in updating "small and minor" things. so lets just remove this....
2018-06-11 17:08:59 +08:00
twinaphex
041670fe02 Get rid of multitude of casting warnings 2018-04-13 00:47:42 +02:00
twinaphex
1751f4a0af Make it possible to read bigger files by replacing ssize_t with int64_t
and size_t with uint64_t
2018-04-13 00:18:11 +02:00
twinaphex
c7c4b723d6 Move path_file_exists to filestream and do away with filestream
dependencies in file/file_path
2017-12-14 20:05:46 +01:00
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex
6af5bd01bf Merge retro_stat and file_path 2017-06-16 15:00:11 +02:00
twinaphex
b13ca2df97 (task_patch.c) Cleanup 2017-05-14 22:23:05 +02:00
twinaphex
88dbbb284d Add ips_pref/bps_pref/ups_pref to content_information_ctx 2017-05-14 01:12:47 +02:00
twinaphex
88c04be7a4 Cleanups 2017-05-14 01:04:37 +02:00
twinaphex
7dfbfef995 Cleanups 2017-05-14 00:54:58 +02:00
twinaphex
71499abf1f (task_patch.c) Cleanups 2017-05-14 00:52:56 +02:00
twinaphex
8ae708576f task_patch.c - cleanups 2017-05-13 22:21:57 +02:00
Twinaphex
b7b3b2cb5f Try to prevent truckload of warnings on iOS 2017-02-26 10:33:03 +01:00
twinaphex
ef5b26350d patch_content - cleanup 2017-02-21 20:38:02 +01:00
twinaphex
75133941a9 Fix relative includes 2017-01-31 05:33:42 +01:00
twinaphex
1a5978d7a2 Move patch.c to tasks/task_patch.c 2017-01-31 05:33:13 +01:00