Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbbert committed Jun 2, 2024
2 parents 82b5a81 + 6879ad7 commit 4a50ff4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/devices/cpu/mipsx/mipsxdasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class mipsx_disassembler : public util::disasm_interface
virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
};

#endif
#endif // MAME_CPU_MIPSX_MIPSXDASM_H
4 changes: 2 additions & 2 deletions src/frontend/mame/ui/selgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void menu_select_game::menu_deactivated()

bool menu_select_game::handle(event const *ev)
{
if (!m_prev_selected && item_count() > 0)
if (!m_prev_selected && (item_count() > 0))
m_prev_selected = item(0).ref();

// if I have to select software, force software list submenu
Expand Down Expand Up @@ -405,7 +405,7 @@ void menu_select_game::populate()
item_append(_("System Settings"), 0, (void *)(uintptr_t)CONF_MACHINE);
m_skip_main_items = 3;

if (m_prev_selected && !have_prev_selected && item_count() > 0)
if (m_prev_selected && !have_prev_selected && (item_count() > 0))
m_prev_selected = item(0).ref();
}
else
Expand Down
37 changes: 20 additions & 17 deletions src/frontend/mame/ui/selmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,7 @@ std::tuple<int, bool, bool> menu_select_launch::handle_middle_down(bool changed,
{
// left panel
assert(show_left_panel());
if ((get_focus() == focused_menu::MAIN) && (selected_index() <= m_available_items))
if ((get_focus() == focused_menu::MAIN) && (selected_index() < m_available_items))
m_prev_selected = get_selection_ref();
set_focus(focused_menu::LEFT);
return std::make_tuple(IPT_INVALID, true, true);
Expand All @@ -2607,7 +2607,7 @@ std::tuple<int, bool, bool> menu_select_launch::handle_middle_down(bool changed,
{
// right panel
assert(show_right_panel());
if ((get_focus() == focused_menu::MAIN) && (selected_index() <= m_available_items))
if ((get_focus() == focused_menu::MAIN) && (selected_index() < m_available_items))
m_prev_selected = get_selection_ref();
set_focus((y < m_right_tabs_bottom) ? focused_menu::RIGHTTOP : focused_menu::RIGHTBOTTOM);
return std::make_tuple(IPT_INVALID, true, true);
Expand Down Expand Up @@ -3157,7 +3157,7 @@ bool menu_select_launch::main_force_visible_selection()
return true;
}
}
else
else if (m_prev_selected)
{
int selection(0);
while ((m_available_items > selection) && (item(selection).ref() != m_prev_selected))
Expand Down Expand Up @@ -3366,8 +3366,6 @@ void menu_select_launch::draw(u32 flags)
// work out colours
rgb_t fgcolor = ui().colors().text_color();
rgb_t bgcolor = ui().colors().text_bg_color();
bool const hovered(is_selectable(pitem) && pointer_in_rect(m_primary_items_hbounds.first, linetop, m_primary_items_hbounds.second, linebottom));
bool const pointerline((pointer_action::MAIN_TRACK_LINE == m_pointer_action) && ((m_primary_lines + linenum) == m_clicked_line));
if (is_selected(itemnum) && (get_focus() == focused_menu::MAIN))
{
// if we're selected, draw with a different background
Expand All @@ -3379,19 +3377,24 @@ void menu_select_launch::draw(u32 flags)
bgcolor, rgb_t(43, 43, 43),
hilight_main_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(1));
}
else if (pointerline && hovered)
{
// draw selected highlight for tracked item
fgcolor = ui().colors().selected_color();
bgcolor = ui().colors().selected_bg_color();
highlight(m_primary_items_hbounds.first, linetop, m_primary_items_hbounds.second, linebottom, bgcolor);
}
else if (pointerline || (!m_ui_error && !(flags & PROCESS_NOINPUT) && hovered && pointer_idle()))
else if (is_selectable(pitem))
{
// draw hover highlight when hovered over or dragged off
fgcolor = ui().colors().mouseover_color();
bgcolor = ui().colors().mouseover_bg_color();
highlight(m_primary_items_hbounds.first, linetop, m_primary_items_hbounds.second, linebottom, bgcolor);
bool const hovered(pointer_in_rect(m_primary_items_hbounds.first, linetop, m_primary_items_hbounds.second, linebottom));
bool const pointerline((pointer_action::MAIN_TRACK_LINE == m_pointer_action) && ((m_primary_lines + linenum) == m_clicked_line));
if (pointerline && hovered)
{
// draw selected highlight for tracked item
fgcolor = ui().colors().selected_color();
bgcolor = ui().colors().selected_bg_color();
highlight(m_primary_items_hbounds.first, linetop, m_primary_items_hbounds.second, linebottom, bgcolor);
}
else if (pointerline || (!m_ui_error && !(flags & PROCESS_NOINPUT) && hovered && pointer_idle()))
{
// draw hover highlight when hovered over or dragged off
fgcolor = ui().colors().mouseover_color();
bgcolor = ui().colors().mouseover_bg_color();
highlight(m_primary_items_hbounds.first, linetop, m_primary_items_hbounds.second, linebottom, bgcolor);
}
}

if (pitem.type() == menu_item_type::SEPARATOR)
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/mame/ui/selsoft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ menu_select_software::~menu_select_software()

bool menu_select_software::handle(event const *ev)
{
if (m_prev_selected == nullptr && item_count() > 0)
if (!m_prev_selected && (item_count() > 0))
m_prev_selected = item(0).ref();

// FIXME: everything above here used run before events were processed
Expand Down
6 changes: 3 additions & 3 deletions src/mame/sega/naomigd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1141,11 +1141,11 @@ ROM_START( dimm )
ROMX_LOAD( "217_203.bin", 0x000000, 0x200000, CRC(a738ea1c) SHA1(e5a229ae7ed48b2955cad63529fd938c6db555e5), ROM_BIOS(4))
ROM_SYSTEM_BIOS(5, "3.01", "BIOS 5")
ROMX_LOAD( "fpr23905c.ic36", 0x000000, 0x200000, CRC(ffffffff) SHA1(972b3b73aa1eabb1091e9096b57a7e5e1d0436d8), ROM_BIOS(5))
ROM_SYSTEM_BIOS(5, "3.03", "BIOS 6")
ROM_SYSTEM_BIOS(6, "3.03", "BIOS 6")
ROMX_LOAD( "fpr23905.ic36", 0x000000, 0x200000, CRC(ffffffff) SHA1(acade4362807c7571b1c2a48ed6067e4bddd404b), ROM_BIOS(6))
ROM_SYSTEM_BIOS(6, "317_312.bin", "BIOS 7")
ROM_SYSTEM_BIOS(7, "317_312.bin", "BIOS 7")
ROMX_LOAD( "317_312.bin", 0x000000, 0x200000, CRC(a738ea1c) SHA1(31d698cd659446ee09a2eeedec6e4bc6a19d05e8), ROM_BIOS(7))
ROM_SYSTEM_BIOS(7, "401_203.bin", "BIOS 8")
ROM_SYSTEM_BIOS(8, "401_203.bin", "BIOS 8")
ROMX_LOAD( "401_203.bin", 0x000000, 0x200000, CRC(a738ea1c) SHA1(edb52597108462bcea8eb2a47c19e51e5fb60638), ROM_BIOS(8))

// dynamically filled with data
Expand Down

0 comments on commit 4a50ff4

Please sign in to comment.