Each of these is assigned and never read anywhere in the tree, so the
work that feeds them is spent for nothing: content_label_len on the
thumbnail path data, sink_discarded on the audio state,
runahead_save_state_size, task_count and msg_queue_regular_padding_x on
the widgets, pipeline_active on the display draw struct,
resolution_hd_enable on the D3D8 and D3D9 states,
memory_search_initialized on the cheat manager, window_title_len and
video_frame_delay_auto_t::frame_time_avg on the video state, and
input_dialog_kb_type on the menu state. Where a write captured a
strlcpy() or fill_pathname() result the call stays and only the
assignment goes.
Two of them were holding up more than themselves.
gfx_widgets_update_icon_layout() branched on whether icons are loaded
solely to pick a padding value, so that conditional computed nothing
and is gone with the field. memory_search_initialized sat beside
memory_initialized, which is read, leaving two near-identical names for
the next reader to tell apart.
The cheat manager state carried a sixteen-kilobyte code-editing
scratch buffer resident in every binary, used only when the cheat
editor runs. It is now a pointer allocated by an ensure helper with
two choke points: the editor entry in copy-idx-to-working, and the
cheat settings builder just before the rows that bind the scratch's
address - necessary since under the lazy settings cache that
builder can run at any moment a lookup first needs it. The scratch
is deliberately never freed once allocated: menu rows hold its
address across content sessions, exactly as they held the old
static array; freeing with the manager would dangle them. The
sizeof at the two binding sites becomes the scratch-size constant
it always meant. Both dumps byte-identical - the settings dump
prints the cheat rows through the ensured buffer.
* (menu) Add input callback for exact cheat search and update menu action
* Updated to fix the C89 CI failure by removing the C++-style comment.
---------
Co-authored-by: bdm110 <[email protected]>