mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-21 07:24:20 +01:00
Do not parse --max-fps float in the client
Many parsing and formatting C functions like strtof() and asprintf() are
locale-dependent. Forcing a C locale just for the conversions in a way
that works on all platforms is a mess.
In practice, this is not a problem, scrcpy always uses the C locale,
because it never calls:
setlocale(LC_ALL, "");
But the max-fps option should not depend on the locale configuration
anyway.
Since the value is parsed by the client in Java anyway, just forward the
string value as is.
This commit is contained in:
@@ -66,14 +66,6 @@ sc_str_parse_integers(const char *s, const char sep, size_t max_items,
|
||||
bool
|
||||
sc_str_parse_integer_with_suffix(const char *s, long *out);
|
||||
|
||||
/**
|
||||
* `Parse `s` as a float into `out`
|
||||
*
|
||||
* Return true if the conversion succeeded, false otherwise.
|
||||
*/
|
||||
bool
|
||||
sc_str_parse_float(const char *s, float *out);
|
||||
|
||||
/**
|
||||
* Search `s` in the list separated by `sep`
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user