ui pointer options: revert reset options to default when pressing Del (conflict with ctrlr cfg)

This commit is contained in:
hap 2024-08-06 13:39:31 +02:00
parent 0f3a9e4ced
commit 8c8c25f5e3
3 changed files with 4 additions and 29 deletions

View File

@ -191,16 +191,11 @@ struct mame_ui_manager::active_pointer
struct mame_ui_manager::pointer_options
{
pointer_options()
: timeout(std::chrono::seconds(3))
, hide_inactive(true)
, timeout_set(false)
, hide_inactive_set(false)
{
reset();
}
void reset()
{
timeout = std::chrono::seconds(3);
hide_inactive = true;
timeout_set = false;
hide_inactive_set = false;
}
bool options_set() const
@ -1793,19 +1788,6 @@ bool mame_ui_manager::hide_inactive_pointers(int target) const noexcept
}
//-------------------------------------------------
// reset_pointer_options - reset per-target
// pointer options
//-------------------------------------------------
void mame_ui_manager::reset_pointer_options(int target) noexcept
{
assert((0 <= target) && (m_pointer_options.size() > target));
if ((0 <= target) && (m_pointer_options.size() > target))
m_pointer_options[target].reset();
}
/***************************************************************************
SLIDER CONTROLS

View File

@ -211,7 +211,6 @@ public:
void set_hide_inactive_pointers(int target, bool hide) noexcept;
std::chrono::steady_clock::duration pointer_activity_timeout(int target) const noexcept;
bool hide_inactive_pointers(int target) const noexcept;
void reset_pointer_options(int target) noexcept;
// drawing informational overlays
void draw_fps_counter(render_container &container);

View File

@ -400,12 +400,6 @@ bool menu_video_options::handle(event const *ev)
ui().set_hide_inactive_pointers(m_target.index(), !ui().hide_inactive_pointers(m_target.index()));
changed = true;
break;
// restore default
case IPT_UI_CLEAR:
ui().reset_pointer_options(m_target.index());
changed = true;
break;
}
break;