mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
-debugger/qt: Fixed crash on hard reset.
-ui/selmenu.cpp: Dismiss error messages on pressing left or right.
This commit is contained in:
parent
b0e8291bb6
commit
d32f7e3a99
@ -1918,7 +1918,11 @@ bool menu_select_launch::handle_keys(u32 flags, int &iptkey)
|
|||||||
|
|
||||||
if (exclusive_input_pressed(iptkey, IPT_UI_CANCEL, 0))
|
if (exclusive_input_pressed(iptkey, IPT_UI_CANCEL, 0))
|
||||||
{
|
{
|
||||||
if (!m_search.empty())
|
if (m_ui_error)
|
||||||
|
{
|
||||||
|
// dismiss error
|
||||||
|
}
|
||||||
|
else if (!m_search.empty())
|
||||||
{
|
{
|
||||||
// escape pressed with non-empty search text clears it
|
// escape pressed with non-empty search text clears it
|
||||||
m_search.clear();
|
m_search.clear();
|
||||||
@ -1940,7 +1944,12 @@ bool menu_select_launch::handle_keys(u32 flags, int &iptkey)
|
|||||||
// accept left/right keys as-is with repeat
|
// accept left/right keys as-is with repeat
|
||||||
if (exclusive_input_pressed(iptkey, IPT_UI_LEFT, (flags & PROCESS_LR_REPEAT) ? 6 : 0))
|
if (exclusive_input_pressed(iptkey, IPT_UI_LEFT, (flags & PROCESS_LR_REPEAT) ? 6 : 0))
|
||||||
{
|
{
|
||||||
if (m_focus == focused_menu::RIGHTTOP)
|
if (m_ui_error)
|
||||||
|
{
|
||||||
|
// dismiss error
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (m_focus == focused_menu::RIGHTTOP)
|
||||||
{
|
{
|
||||||
// Swap the right panel and swallow it
|
// Swap the right panel and swallow it
|
||||||
iptkey = IPT_INVALID;
|
iptkey = IPT_INVALID;
|
||||||
@ -1971,7 +1980,12 @@ bool menu_select_launch::handle_keys(u32 flags, int &iptkey)
|
|||||||
// swallow left/right keys if they are not appropriate
|
// swallow left/right keys if they are not appropriate
|
||||||
if (exclusive_input_pressed(iptkey, IPT_UI_RIGHT, (flags & PROCESS_LR_REPEAT) ? 6 : 0))
|
if (exclusive_input_pressed(iptkey, IPT_UI_RIGHT, (flags & PROCESS_LR_REPEAT) ? 6 : 0))
|
||||||
{
|
{
|
||||||
if (m_focus == focused_menu::RIGHTTOP)
|
if (m_ui_error)
|
||||||
|
{
|
||||||
|
// dismiss error
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (m_focus == focused_menu::RIGHTTOP)
|
||||||
{
|
{
|
||||||
// Swap the right panel and swallow it
|
// Swap the right panel and swallow it
|
||||||
iptkey = IPT_INVALID;
|
iptkey = IPT_INVALID;
|
||||||
|
@ -463,8 +463,9 @@ void MainWindow::debugActClose()
|
|||||||
|
|
||||||
void MainWindow::debuggerExit()
|
void MainWindow::debuggerExit()
|
||||||
{
|
{
|
||||||
|
// this isn't called from a Qt event loop, so close() will leak the window object
|
||||||
m_exiting = true;
|
m_exiting = true;
|
||||||
close();
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -251,7 +251,8 @@ void WindowQt::debugActQuit()
|
|||||||
|
|
||||||
void WindowQt::debuggerExit()
|
void WindowQt::debuggerExit()
|
||||||
{
|
{
|
||||||
close();
|
// this isn't called from a Qt event loop, so close() will leak the window object
|
||||||
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user