From 5395cbcea2ba20478753e121208aad75c0ae6605 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 27 Aug 2024 02:34:48 +1000 Subject: [PATCH 1/3] -ui/menu.cpp: Avoid floating point equality comparison. * Fixes pointer input not working on menus at some window sizes in 32-bit x86 builds. -leapfrog_leappad_cart.xml: Fixed a description. --- hash/leapfrog_leappad_cart.xml | 2 +- src/frontend/mame/ui/menu.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hash/leapfrog_leappad_cart.xml b/hash/leapfrog_leappad_cart.xml index df1e8b88f11f1..a093848c7f60c 100644 --- a/hash/leapfrog_leappad_cart.xml +++ b/hash/leapfrog_leappad_cart.xml @@ -201,7 +201,7 @@ license:CC0-1.0 - FUN-damentals Series - Smart Guide to 4rd Grade (UK) + FUN-damentals Series - Smart Guide to 4th Grade (UK) 2002 LeapFrog diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp index d6b6d29fccf41..740a310e2f50d 100644 --- a/src/frontend/mame/ui/menu.cpp +++ b/src/frontend/mame/ui/menu.cpp @@ -27,6 +27,7 @@ #include "osdepend.h" #include +#include #include #include #include @@ -1930,7 +1931,7 @@ bool menu::check_metrics() render_target &target(render.ui_target()); std::pair const uisize(target.width(), target.height()); float const aspect = render.ui_aspect(&container()); - if ((uisize == m_last_size) && (aspect == m_last_aspect)) + if ((uisize == m_last_size) && (std::fabs(1.0F - (aspect / m_last_aspect)) < 1e-6F)) return false; m_last_size = uisize; From 77d4cc347543aca6e07f0fd32c385c96d8d40808 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 27 Aug 2024 04:17:23 +1000 Subject: [PATCH 2/3] Cleaned up the mess from #12610: * Command line options need to be documented. * Don't assume C strings returned as option values remain valid indefinitely. * Fixed wording for option description. --- docs/source/commandline/commandline-all.rst | 22 ++++++++++++++++--- docs/source/commandline/commandline-index.rst | 1 + src/osd/modules/debugger/debuggdbstub.cpp | 12 +++++----- src/osd/modules/lib/osdobj_common.cpp | 2 +- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/docs/source/commandline/commandline-all.rst b/docs/source/commandline/commandline-all.rst index fe093cc0d86f0..d83b401cc32cb 100644 --- a/docs/source/commandline/commandline-all.rst +++ b/docs/source/commandline/commandline-all.rst @@ -3677,8 +3677,9 @@ Debugging Options Acts as a remote debugging server for the GNU debugger (GDB). Only a small subset of the CPUs emulated by MAME are supported. Use the :ref:`debugger_port ` option to set the - listening port on the loopback interface. Supported on all platforms - with TCP socket support. + listening port and the + :ref:`debugger_host ` option to set the + address to bind to. Supported on all platforms with TCP socket support. Example: .. code-block:: bash @@ -3732,11 +3733,26 @@ Debugging Options mame ibm_5150 -watchdog 30 +.. _mame-commandline-debuggerhost: + +**-debugger_host** *
* + + Set the IP address to listen on to accept GDB connections when using the + GDB stub debugger module (see the + :ref:`debugger ` option). + + The default is ``localhost``. + + Example: + .. code-block:: bash + + mame rfjet -debug -debugger gdbstub -debugger_host 0.0.0.0 + .. _mame-commandline-debuggerport: **-debugger_port** ** - Set the TCP port number to listen on for GDB connections when using the GDB + Set the TCP port number to accept GDB connections on when using the GDB stub debugger module (see the :ref:`debugger ` option). diff --git a/docs/source/commandline/commandline-index.rst b/docs/source/commandline/commandline-index.rst index c62dfef518bc2..cb6b9a7dfb4b8 100644 --- a/docs/source/commandline/commandline-index.rst +++ b/docs/source/commandline/commandline-index.rst @@ -298,6 +298,7 @@ Core Debugging Options | :ref:`debugscript ` | :ref:`[no]update_in_pause ` | :ref:`watchdog ` +| :ref:`debugger_host ` | :ref:`debugger_port ` | :ref:`debugger_font ` | :ref:`debugger_font_size ` diff --git a/src/osd/modules/debugger/debuggdbstub.cpp b/src/osd/modules/debugger/debuggdbstub.cpp index ca042aa807f2f..77dea9ed0489d 100644 --- a/src/osd/modules/debugger/debuggdbstub.cpp +++ b/src/osd/modules/debugger/debuggdbstub.cpp @@ -496,8 +496,8 @@ static const std::map gdb_register_maps = class debug_gdbstub : public osd_module, public debug_module { public: - debug_gdbstub() - : osd_module(OSD_DEBUG_PROVIDER, "gdbstub"), debug_module(), + debug_gdbstub() : + osd_module(OSD_DEBUG_PROVIDER, "gdbstub"), debug_module(), m_readbuf_state(PACKET_START), m_machine(nullptr), m_maincpu(nullptr), @@ -506,7 +506,7 @@ class debug_gdbstub : public osd_module, public debug_module m_address_space(nullptr), m_debugger_cpu(nullptr), m_debugger_console(nullptr), - m_debugger_host(nullptr), + m_debugger_host(), m_debugger_port(0), m_socket(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE), m_is_be(false), @@ -601,7 +601,7 @@ class debug_gdbstub : public osd_module, public debug_module address_space *m_address_space; debugger_cpu *m_debugger_cpu; debugger_console *m_debugger_console; - const char *m_debugger_host; + std::string m_debugger_host; int m_debugger_port; emu_file m_socket; bool m_is_be; @@ -795,8 +795,8 @@ void debug_gdbstub::wait_for_debugger(device_t &device, bool firststop) std::string socket_name = string_format("socket.%s:%d", m_debugger_host, m_debugger_port); std::error_condition const filerr = m_socket.open(socket_name); if ( filerr ) - fatalerror("gdbstub: failed to start listening on host %s port %d\n", m_debugger_host, m_debugger_port); - osd_printf_info("gdbstub: listening on host %s port %d\n", m_debugger_host, m_debugger_port); + fatalerror("gdbstub: failed to start listening on address %s port %d\n", m_debugger_host, m_debugger_port); + osd_printf_info("gdbstub: listening on address %s port %d\n", m_debugger_host, m_debugger_port); m_initialized = true; } diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp index e2217df6ae4e1..ca166c3dbd94c 100644 --- a/src/osd/modules/lib/osdobj_common.cpp +++ b/src/osd/modules/lib/osdobj_common.cpp @@ -58,7 +58,7 @@ const options_entry osd_options::s_option_entries[] = { nullptr, nullptr, core_options::option_type::HEADER, "OSD DEBUGGING OPTIONS" }, { OSDOPTION_DEBUGGER, OSDOPTVAL_AUTO, core_options::option_type::STRING, "debugger used: " }, - { OSDOPTION_DEBUGGER_HOST, "localhost", core_options::option_type::STRING, "host to use for gdbstub debugger" }, + { OSDOPTION_DEBUGGER_HOST, "localhost", core_options::option_type::STRING, "address to bind to for gdbstub debugger" }, { OSDOPTION_DEBUGGER_PORT, "23946", core_options::option_type::INTEGER, "port to use for gdbstub debugger" }, { OSDOPTION_DEBUGGER_FONT ";dfont", OSDOPTVAL_AUTO, core_options::option_type::STRING, "font to use for debugger views" }, { OSDOPTION_DEBUGGER_FONT_SIZE ";dfontsize", "0", core_options::option_type::FLOAT, "font size to use for debugger views" }, From 6d1970f5f1085436550ed93167df685c0d581679 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 28 Aug 2024 05:56:16 +1000 Subject: [PATCH 3/3] Bumped version to 0.269 --- android-project/app/src/main/AndroidManifest.xml | 4 ++-- docs/source/conf.py | 4 ++-- makefile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml index 37320df98a98c..fda98bb687e32 100644 --- a/android-project/app/src/main/AndroidManifest.xml +++ b/android-project/app/src/main/AndroidManifest.xml @@ -4,8 +4,8 @@ --> diff --git a/docs/source/conf.py b/docs/source/conf.py index 63dd0bfed6a07..fbdcc2a092634 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -63,9 +63,9 @@ # built documents. # # The short X.Y version. -version = '0.268' +version = '0.269' # The full version, including alpha/beta/rc tags. -release = '0.268' +release = '0.269' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/makefile b/makefile index 7af7a7c8020e1..97227bd2f4e4f 100644 --- a/makefile +++ b/makefile @@ -1578,7 +1578,7 @@ endif ifeq (posix,$(SHELLTYPE)) $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo '#define BARE_BUILD_VERSION "0.268"' > $@ + @echo '#define BARE_BUILD_VERSION "0.269"' > $@ @echo '#define BARE_VCS_REVISION "$(NEW_GIT_VERSION)"' >> $@ @echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char bare_vcs_revision[];' >> $@ @@ -1588,7 +1588,7 @@ $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) @echo 'const char build_version[] = BARE_BUILD_VERSION " (" BARE_VCS_REVISION ")";' >> $@ else $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo #define BARE_BUILD_VERSION "0.268" > $@ + @echo #define BARE_BUILD_VERSION "0.269" > $@ @echo #define BARE_VCS_REVISION "$(NEW_GIT_VERSION)" >> $@ @echo extern const char bare_build_version[]; >> $@ @echo extern const char bare_vcs_revision[]; >> $@