Commit Graph

13 Commits

Author SHA1 Message Date
twinaphex
a0955d4fa6 Fix potentially bad regression - would crash on any platform where unsigned long is more than 32 bits (not sure if any platform has this, however) 2021-09-30 17:19:38 +02:00
Nathan Strong
fb86ca6e33 Fix the snprintf warnings for everyone this time
== DETAILS
So, basically this back-and-forth is because we used fixed-size
data types (i.e. `uint32_t`) which maps to different primitive data
types on different platforms. So `uint32_t` might be a `long` on some
platforms (e.g. Wii U), while it's just a plain integer on others (PC).
And the format specifier works off primitive data type, not data type
size.

So, to resolve this, we:

- keep `%lx` as the format specifier
- cast the parameter to printf to unsigned long

This is better than the alternatives that could cause problems trying to
cast a long down to an int.
2021-09-25 15:08:34 -07:00
Nathan Strong
9b2d4236ad WIIU: Clean up a bunch of compiler warnings
== DETAILS
These changes fall into a few broad categories:

1. Explicitly undefine things we want to re-define due to conflicts with
   the version of devkitpro we're using
2. Clean up hex format specifiers to use `%lx` or `%lX` when working with
   long integers
3. Move variables inside the ifdef they're used in to squelch "unused variable"
   messages
4. Add parenthesis to make Wii U shader declarations stop complaining

And then there's a weird "misleading indent" warning that I fixed by just
rewriting a block of code to use a switch statement instead of if-then-else.

These changes work fine on Wii U, but we'll need to keep an eye on CI/CD to see
if other platform builds break.
2021-09-25 13:25:39 -07:00
twinaphex
0482892a9c Get rid of return variable for snprintf 2021-05-18 23:09:45 +02:00
twinaphex
4df6d287e3 (Clang) Silence 'n' is never used warnings 2021-02-03 11:48:33 +01:00
twinaphex
320cc443a8 Reorder structs, alignment 2020-09-01 01:28:33 +02:00
twinaphex
4ec216dc0b Get rid of file_path_str 2020-08-22 01:06:10 +02:00
twinaphex
4ee45304b0 More warning fixes 2020-08-01 18:14:48 +02:00
twinaphex
4c86e67c6e core_backup_list_init - prevent garbage values 2020-06-29 19:18:43 +02:00
twinaphex
dc35458761 Turn calloc into malloc 2020-06-29 03:49:56 +02:00
jdgleaver
2782b87267 Add option to automatically backup cores when updating 2020-06-16 11:12:22 +01:00
jdgleaver
f78c0a8cc9 Fix licensing of core_backup.h/.c 2020-06-04 13:22:46 +01:00
jdgleaver
0a33e562f4 Add option to backup/restore installed cores 2020-06-04 12:20:58 +01:00