Before this change, an 8-bit value was guaranteed to be lesser than the
size of this array (256). Instead of removing the check, I make it
meaningful by reducing the size of the array.
Only limit extensions under the condition that the valid_extensions list
is not empty and the user wishes to limit the extensions. Otherwise
present files of all recognized extensions.
Part of this logic was implemented in 8f32801292 where the
point was to show supported files when core info file is missing. The
other part is the filter_by_current_core option.
Cheevos define a special macro defined to -1 and uses it as one of the
values for enum event_command. Make this value a part of the enum
definition so that this type is not optimized to be unsigned.
Also simplify this part; the point here is to start the copy later, but
otherwise the buffer size is the same, and it's still a string, so needs
no special handling.
At optimization level -O3, GCC generates a warning about its own
optimizations, likely due to loop unrolling. Manually unroll the loop to
eliminate any ambiguity and prevent the warning.
One of the GCC14's optimization heuristic triggered here, suggesting
that the special value of len (size_t) could potentially be lesser than
the file's size (int64_t) but greater than "maximum object size" (set by
byte-size, PTRDIFF_MAX by default).
Use the same type as the file size it's compared to, and adjust the
sentinel value to spell INT64_MAX.
* unsigned vs signed comparison
* copy DEBUG_VAR from wiiu - this one prints pointer values in a
portable way
* prove GCC14 that a date formatted as "00/00/0000" can fit into 11
bytes
* explicitly mention previously unhandled enum constants
* Adding GFX widgets in b9849f78f7 and 1235a7435e orphaned
ctr_set_osd_msg(). Reinstate it instead of removing, since it's
effectively the same as calling font_driver_render_msg, but with
checks.
* remove sp from clobber list in inline assembly
Due to touchscreen quick tap function, binding runs into problems
with the default setting that works well on other platforms. Using
a nonzero value avoids that problem.
PATH_MAX_LENGTH is pretty short on CTR and not really adequate here
since this buffer is not storing a path.
Allocate and possibly reallocate from heap instead of using the
stack here.