MAME 0.238

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE0DYtsBhE4EM627+6wXSxAYxAcQ4FAmGdLcoACgkQwXSxAYxA
 cQ6MeQ/+M+6k0T8AGNVh26kArGzBtY1BxNbLdu+fNbeCJP0a/bHf9nj4cDFqHvR6
 ZdT1A/BaNpXfkHVCnoq6P+thjPS+HKxxC0Y3Np0MRIehgERPc4wCL5k+h/ClYWit
 oiwluzi/S/PLwP819k13Rq9QSx8OSHQqXE0z6q6mihKp+Dr2m6XAvWwleXYDrtfp
 x3Hi9xBbCIHj2tRQ98hpZo/NMwlj+fgfPpo6dJBQP1O04Mvx472unH4tOCJH629F
 6Msxct9W1flo3dpESU3vWYKOCW/WE11X4u84IRDKqmREcYekewMvL0RRIIeMU1x2
 sFtFj3BA9va0kD2VgcKyylO/poVD+Sg6G1K0ZrQYOKbThyIc/sMapw1hY7VDj2dj
 +0DVPtxvk4K64u16psEqqtRj9wzVzYr5Uhww78mJN0p1n3QNQfWteu2oNo2kh3Yj
 go6ezvqA5412FMtb9Kok8+800mSZR7aXFxgRf+5ymNyzNibQ9+ud+R8XHlsTCOil
 i5dux2jcauFvSZR3OKRkZPlJr57Q4l1jY7h5/qJZd7fzicMNvfU5fdI2ra1NzElr
 VgQUTBFCgya2TWIJMfuSIAAioMstSeqWKjG06PN4XI8hB5VhmM1W+LVEx/1cvjml
 JBYvd59MqqimGruim27dCopCEZT0ZIEKvailg35PCFbKvc31vhM=
 =hKOW
 -----END PGP SIGNATURE-----

Merged MAME 0.238 release branch into master.
This commit is contained in:
Vas Crabb 2021-11-24 06:54:41 +11:00
commit 2d4a0e6ab6
6 changed files with 42 additions and 23 deletions

View File

@ -4,8 +4,8 @@
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mamedev.mame" package="org.mamedev.mame"
android:versionCode="237" android:versionCode="238"
android:versionName="0.237" android:versionName="0.238"
android:installLocation="auto"> android:installLocation="auto">
<!-- OpenGL ES 2.0 --> <!-- OpenGL ES 2.0 -->

View File

@ -56,16 +56,16 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'MAME Documentation' project = u'MAME Documentation'
copyright = u'2021, MAMEdev Team' copyright = u'1997-2021, MAMEdev and contributors'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.237' version = '0.238'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.237' release = '0.238'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -1546,7 +1546,7 @@ endif
ifeq (posix,$(SHELLTYPE)) ifeq (posix,$(SHELLTYPE))
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo '#define BARE_BUILD_VERSION "0.237"' > $@ @echo '#define BARE_BUILD_VERSION "0.238"' > $@
@echo '#define BARE_VCS_REVISION "$(NEW_GIT_VERSION)"' >> $@ @echo '#define BARE_VCS_REVISION "$(NEW_GIT_VERSION)"' >> $@
@echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char bare_build_version[];' >> $@
@echo 'extern const char bare_vcs_revision[];' >> $@ @echo 'extern const char bare_vcs_revision[];' >> $@
@ -1556,7 +1556,7 @@ $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo 'const char build_version[] = BARE_BUILD_VERSION " (" BARE_VCS_REVISION ")";' >> $@ @echo 'const char build_version[] = BARE_BUILD_VERSION " (" BARE_VCS_REVISION ")";' >> $@
else else
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo #define BARE_BUILD_VERSION "0.237" > $@ @echo #define BARE_BUILD_VERSION "0.238" > $@
@echo #define BARE_VCS_REVISION "$(NEW_GIT_VERSION)" >> $@ @echo #define BARE_VCS_REVISION "$(NEW_GIT_VERSION)" >> $@
@echo extern const char bare_build_version[]; >> $@ @echo extern const char bare_build_version[]; >> $@
@echo extern const char bare_vcs_revision[]; >> $@ @echo extern const char bare_vcs_revision[]; >> $@

View File

@ -337,10 +337,13 @@ void menu_select_game::populate(float &customtop, float &custombottom)
icon.second.texture.reset(); icon.second.texture.reset();
set_switch_image(); set_switch_image();
int old_item_selected = -1;
bool have_prev_selected = false;
int old_item_selected = -1;
if (!isfavorite()) if (!isfavorite())
{ {
if (m_populated_favorites)
m_prev_selected = nullptr;
m_populated_favorites = false; m_populated_favorites = false;
m_displaylist.clear(); m_displaylist.clear();
machine_filter const *const flt(m_persistent_data.filter_data().get_current_filter()); machine_filter const *const flt(m_persistent_data.filter_data().get_current_filter());
@ -389,7 +392,8 @@ void menu_select_game::populate(float &customtop, float &custombottom)
int curitem = 0; int curitem = 0;
for (ui_system_info const &elem : m_displaylist) for (ui_system_info const &elem : m_displaylist)
{ {
if (old_item_selected == -1 && elem.driver->name == reselect_last::driver()) have_prev_selected = have_prev_selected || (&elem == m_prev_selected);
if ((old_item_selected == -1) && (elem.driver->name == reselect_last::driver()))
old_item_selected = curitem; old_item_selected = curitem;
item_append(elem.description, elem.is_clone ? FLAG_INVERT : 0, (void *)&elem); item_append(elem.description, elem.is_clone ? FLAG_INVERT : 0, (void *)&elem);
@ -399,11 +403,14 @@ void menu_select_game::populate(float &customtop, float &custombottom)
else else
{ {
// populate favorites list // populate favorites list
if (!m_populated_favorites)
m_prev_selected = nullptr;
m_populated_favorites = true; m_populated_favorites = true;
m_search.clear(); m_search.clear();
mame_machine_manager::instance()->favorite().apply_sorted( mame_machine_manager::instance()->favorite().apply_sorted(
[this, &old_item_selected, curitem = 0] (ui_software_info const &info) mutable [this, &have_prev_selected, &old_item_selected, curitem = 0] (ui_software_info const &info) mutable
{ {
have_prev_selected = have_prev_selected || (&info == m_prev_selected);
if (info.startempty) if (info.startempty)
{ {
if (old_item_selected == -1 && info.shortname == reselect_last::driver()) if (old_item_selected == -1 && info.shortname == reselect_last::driver())
@ -412,8 +419,8 @@ void menu_select_game::populate(float &customtop, float &custombottom)
bool cloneof = strcmp(info.driver->parent, "0"); bool cloneof = strcmp(info.driver->parent, "0");
if (cloneof) if (cloneof)
{ {
int cx = driver_list::find(info.driver->parent); int const cx = driver_list::find(info.driver->parent);
if (cx != -1 && ((driver_list::driver(cx).flags & machine_flags::IS_BIOS_ROOT) != 0)) if ((0 <= cx) && ((driver_list::driver(cx).flags & machine_flags::IS_BIOS_ROOT) != 0))
cloneof = false; cloneof = false;
} }
@ -436,6 +443,9 @@ void menu_select_game::populate(float &customtop, float &custombottom)
item_append(_("Configure Options"), 0, (void *)(uintptr_t)CONF_OPTS); item_append(_("Configure Options"), 0, (void *)(uintptr_t)CONF_OPTS);
item_append(_("Configure Machine"), 0, (void *)(uintptr_t)CONF_MACHINE); item_append(_("Configure Machine"), 0, (void *)(uintptr_t)CONF_MACHINE);
skip_main_items = 3; skip_main_items = 3;
if (m_prev_selected && !have_prev_selected)
m_prev_selected = item(0).ref();
} }
else else
{ {
@ -1036,7 +1046,7 @@ void menu_select_game::get_selection(ui_software_info const *&software, ui_syste
if (m_populated_favorites) if (m_populated_favorites)
{ {
software = reinterpret_cast<ui_software_info const *>(get_selection_ptr()); software = reinterpret_cast<ui_software_info const *>(get_selection_ptr());
system = &m_persistent_data.systems()[driver_list::find(software->driver->name)]; system = software ? &m_persistent_data.systems()[driver_list::find(software->driver->name)] : nullptr;
} }
else else
{ {
@ -1100,7 +1110,7 @@ void menu_select_game::filter_selected()
} }
} }
m_persistent_data.filter_data().set_current_filter_type(new_type); m_persistent_data.filter_data().set_current_filter_type(new_type);
reset(reset_options::SELECT_FIRST); reset(reset_options::REMEMBER_REF);
}); });
} }
} }

View File

@ -1419,7 +1419,6 @@ void menu_select_launch::handle_keys(uint32_t flags, int &iptkey)
} }
else if (m_focus == focused_menu::LEFT) else if (m_focus == focused_menu::LEFT)
{ {
m_prev_selected = nullptr;
filter_selected(); filter_selected();
} }
return; return;
@ -1774,7 +1773,6 @@ void menu_select_launch::handle_events(uint32_t flags, event &ev)
} }
else if (hover() >= HOVER_FILTER_FIRST && hover() <= HOVER_FILTER_LAST) else if (hover() >= HOVER_FILTER_FIRST && hover() <= HOVER_FILTER_LAST)
{ {
m_prev_selected = nullptr;
m_filter_highlight = hover() - HOVER_FILTER_FIRST; m_filter_highlight = hover() - HOVER_FILTER_FIRST;
filter_selected(); filter_selected();
stop = true; stop = true;
@ -1953,18 +1951,29 @@ void menu_select_launch::draw(uint32_t flags)
// make sure the selection // make sure the selection
if (m_available_items < m_visible_lines) if (m_available_items < m_visible_lines)
m_visible_lines = m_available_items; m_visible_lines = m_available_items;
if (top_line < 0 || is_first_selected()) int selection;
if (selected_index() < m_available_items)
{
selection = selected_index();
}
else
{
selection = 0;
while ((m_available_items > selection) && (item(selection).ref() != m_prev_selected))
++selection;
}
if (top_line < 0 || !selection)
{ {
top_line = 0; top_line = 0;
} }
else if (selected_index() < m_available_items) else if (selection < m_available_items)
{ {
if (selected_index() >= (top_line + m_visible_lines)) if ((selection >= (top_line + m_visible_lines)) || (selection <= top_line))
top_line = selected_index() - (m_visible_lines / 2); top_line = (std::max)(selection - (m_visible_lines / 2), 0);
if ((top_line + m_visible_lines) >= m_available_items) if ((top_line + m_visible_lines) >= m_available_items)
top_line = m_available_items - m_visible_lines; top_line = m_available_items - m_visible_lines;
else if (selected_index() >= (top_line + m_visible_lines - 2)) else if (selection >= (top_line + m_visible_lines - 2))
top_line = selected_index() - m_visible_lines + ((selected_index() == (m_available_items - 1)) ? 1: 2); top_line = selection - m_visible_lines + ((selection == (m_available_items - 1)) ? 1: 2);
} }
// determine effective positions taking into account the hilighting arrows // determine effective positions taking into account the hilighting arrows

View File

@ -741,7 +741,7 @@ void menu_select_software::filter_selected()
} }
} }
m_data->set_filter_type(new_type); m_data->set_filter_type(new_type);
reset(reset_options::SELECT_FIRST); reset(reset_options::REMEMBER_REF);
}); });
} }
} }