when the previous title differs from the current title
(X11) Have to roll back the previous title optimization/less calls to XChangeProperty,
because the title is lost upon toggling between fullscreen/windowed and is no longer
set
at regular intervals even when the title output for the window title had not
changed at all, now we compare it properly against the last set title, and
only if it has changed will we make the call to XChangeProperty. Also, do
away with strlen(title) calculation and use return value of
video_driver_get_window_title instead
(menu_displaylist.c) Some optimizations:
* Make sure val_d is never bigger than 16, it should just
contain a number. 16 is more than plenty (and probably too big even)
* Hose val_d out of loops if its value never changes inside the loop
* Attempt to avoid calling msg_hash_to_str inside loops unnecessarily
* Don't attempt to call msg_hash_to_str in a loop, cache it once outside
inside a local variable
* Do away with some spurious snprintf usage for RGUI (truncation does not matter
as pointed out by jdgleaver, so we needn't be concerned)
(snprintf) Try to reduce or simplify snprintf calls, only tend to
use it for processing integers/numbers and avoid it for regular
string concatenation (NOTE: we try to be a bit safer about it to
address earlier cited criticism, although we don't consider concatenating
3 or 4 characters at the end to be insecure)
(msg_hash_to_str) Try to avoid duplicate calls to the same localized
string when we can just cache the results once instead locally
file path names instead of snprintf
(ctr_gfx.c) Use strlcpy instead of snprintf where possible
(ctr_gfx.c) Use snprintf instead of sprintf where possible
(ctr_gfx.c) Some general style nits
Avoids the internal strlen call inside strdup, and strdup is a deprecated
function starting from MSVC2005 anyways.
NOTE: Do NOT pass STRLEN_CONST as n parameter to strldup, it needs to
be at least +1 character higher than the strlen return value of the same
string
* steam.c - cleanups:
* Use string_to_lower from libretro-common/stdstring.c instead of
its own version
* Some stylistic changes
* Rewrite strncpy calls into strlcpy/strlcat/manual assignment
* Make it C89 compliant
* Some unused variables