Accepted values are 0 to 999. Rewrite this part to use strtol and test
for values in that range.
Co-authored-by: pstef <3462925+pstef@users.noreply.github.com>
- Use the password stored in the connection profile instead of asking
each time to the user
- `Disconnect` menu item wasn't shown even when connected
When entering the Wi-Fi menu first, `nmcli_connection_info` is called with
`NULL`. If we return `false` here, the menu doesn't show the `Disconnect`
menu item even when the wifi is on and connected.
- Don't consider wired connections when checking if the device is connected
`cmd_file = popen("nmcli -f NAME c show --active | tail -n+2", "r");`
That command returns all active connections, even the wired ones. That
means that if the wifi is not connected but we have a wired connection,
retroarch shows the Disconnect menu item to disconnect ... a
non-existent wifi connection.
There is a type mismatch between selection (size_t) and how it's passed
to some functions. In 4f3ae82 I got it backwards and changed the type in
savestate thumbnail function definitions to size_t, but in that case we
can assume that there won't be more than 999. So in this case it's OK to
keep the unsigned int and cast selection to that type.
Thumbnails on playlists are the other case and the limit is not so clear
to me, so I assume it's reasonable to promote the type of the function
parameter i from unsigned to size_t.
-ffast-math was added in ff14092d8d with a comment that it "helps SINC
resampler to auto-vectorize". The flag is an alias for "-fno-math-errno
-funsafe-math-optimizations -ffp-contract=fast -fno-honor-infinities
-fno-honor-nans". The last two of those cause compiler complaints
because while the flag was meant for this file, it's shared across the
codebase that includes statements that operate on infinities and NaNs.
GCC 13.3 with -fopt-info-vec reports 18 vectorizations for `-O3
-ffast-math`, 17 for `-O3 -fno-math-errno -funsafe-math-optimizations
-ffp-contract=fast` and also 17 for plain `-O3`. So using the subset of
-ffast-math without the offending flags buys nothing and loses 1
vectorization.
Both GCC and Clang provide the "fast-math" pragma directive, which I add
to this one file that benefits from it, under the condition that it's
supported. -ffast-math is removed from most of the makefiles.