From fccbed7657675a5e1c4c63fff08c61ab24964be2 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 2 Nov 2023 02:08:05 +1100 Subject: [PATCH] Miscellaneous fixes: * docs: Added option for Wayland support to compiling guide. * docs: Clarified behaviour of memory region read/write methods. * Fixed some editing errors in Turkish UI translation. * Added some parentheses on ternary conditional operators for clarity. --- docs/source/initialsetup/compilingmame.rst | 3 +++ docs/source/luascript/ref-mem.rst | 12 ++++++++---- language/Turkish/strings.po | 4 +--- src/frontend/mame/luaengine_mem.cpp | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/source/initialsetup/compilingmame.rst b/docs/source/initialsetup/compilingmame.rst index 1f5e559744a..3242cca9c22 100644 --- a/docs/source/initialsetup/compilingmame.rst +++ b/docs/source/initialsetup/compilingmame.rst @@ -567,6 +567,9 @@ NO_USE_PORTAUDIO NO_USE_PULSEAUDIO Set to **1** to disable building the PulseAudio sound output module on Linux. +USE_WAYLAND + Set to **1** to include support for bgfx video output with the Wayland + display server. USE_TAPTUN Set to **1** to include the tap/tun network module, or set to **0** to disable building the tap/tun network module. The tap/tun network module is diff --git a/docs/source/luascript/ref-mem.rst b/docs/source/luascript/ref-mem.rst index 2222a785e24..24c16670c47 100644 --- a/docs/source/luascript/ref-mem.rst +++ b/docs/source/luascript/ref-mem.rst @@ -421,16 +421,20 @@ Methods region:read_i{8,16,32,64}(offs) Reads a signed integer value of the size in bits from the specified offset - in the memory region. + in the memory region. The offset is specified in bytes. Reading beyond the + end of the memory region returns zero. region:read_u{8,16,32,64}(offs) Reads an unsigned integer value of the size in bits from the specified - offset in the memory region. + offset in the memory region. The offset is specified in bytes. Reading + beyond the end of the memory region returns zero. region:write_i{8,16,32,64}(offs, val) Writes a signed integer value of the size in bits to the specified offset in - the memory region. + the memory region. The offset is specified in bytes. Attempting to write + beyond the end of the memory region has no effect. region:write_u{8,16,32,64}(offs, val) Writes an unsigned integer value of the size in bits to the specified offset - in the memory region. + in the memory region. The offset is specified in bytes. Attempting to + write beyond the end of the memory region has no effect. Properties ~~~~~~~~~~ diff --git a/language/Turkish/strings.po b/language/Turkish/strings.po index 5fc1df53e94..61c40d44d2c 100644 --- a/language/Turkish/strings.po +++ b/language/Turkish/strings.po @@ -1560,7 +1560,6 @@ msgid "" "Uptime: %1$d:%2$02d:%3$02d\n" "\n" msgstr "" -msgid "" "Çalışma zamanı: %1$d:%2$02d:%3$02d\n" "\n" @@ -1570,7 +1569,6 @@ msgid "" "Uptime: %1$d:%2$02d\n" "\n" msgstr "" -msgid "" "Çalışma zamanı: %1$d:%2$02d\n" "\n" @@ -3440,7 +3438,7 @@ msgstr "LAN\tKusurlu\n" #: src/frontend/mame/ui/selmenu.cpp:3060 msgid "WAN\tUnimplemented\n" -msgstr "WAN\tUygulanmadı\in" +msgstr "WAN\tUygulanmadı\n" #: src/frontend/mame/ui/selmenu.cpp:3062 msgid "WAN\tImperfect\n" diff --git a/src/frontend/mame/luaengine_mem.cpp b/src/frontend/mame/luaengine_mem.cpp index 4d69ef3b7b8..3689c1c9bc5 100644 --- a/src/frontend/mame/luaengine_mem.cpp +++ b/src/frontend/mame/luaengine_mem.cpp @@ -26,7 +26,7 @@ T region_read(memory_region ®ion, offs_t address) const offs_t lowmask = region.bytewidth() - 1; for (int i = 0; i < sizeof(T); i++) { - int addr = region.endianness() == ENDIANNESS_LITTLE ? address + sizeof(T) - 1 - i : address + i; + int addr = (region.endianness() == ENDIANNESS_LITTLE) ? (address + sizeof(T) - 1 - i) : (address + i); if (addr < region.bytes()) { if constexpr (sizeof(T) > 1) @@ -52,7 +52,7 @@ void region_write(memory_region ®ion, offs_t address, T val) const offs_t lowmask = region.bytewidth() - 1; for (int i = 0; i < sizeof(T); i++) { - int addr = region.endianness() == ENDIANNESS_BIG ? address + sizeof(T) - 1 - i : address + i; + int addr = (region.endianness() == ENDIANNESS_BIG) ? (address + sizeof(T) - 1 - i) : (address + i); if (addr < region.bytes()) { if (region.endianness() == ENDIANNESS_BIG)