Skip to content

Commit 84fd4d8

Browse files
committed
Files for 277.
1 parent 3f92a4f commit 84fd4d8

File tree

19 files changed

+460
-404
lines changed

19 files changed

+460
-404
lines changed

docs/release/makefile

Lines changed: 127 additions & 178 deletions
Large diffs are not rendered by default.

docs/release/scripts/genie.lua

Lines changed: 7 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,6 @@ newoption {
157157
},
158158
}
159159

160-
newoption {
161-
trigger = "distro",
162-
description = "Choose distribution",
163-
allowed = {
164-
{ "generic", "generic" },
165-
{ "debian-stable", "debian-stable" },
166-
{ "ubuntu-intrepid", "ubuntu-intrepid" },
167-
},
168-
}
169-
170160
newoption {
171161
trigger = "target",
172162
description = "Building target",
@@ -573,10 +563,6 @@ dofile ("toolchain.lua")
573563
-- Avoid error when invoking genie --help.
574564
if (_ACTION == nil) then return false end
575565

576-
-- define PTR64 if we are a 64-bit target
577-
configuration { "x64 or android-*64"}
578-
defines { "PTR64=1" }
579-
580566
-- define MAME_DEBUG if we are a debugging build
581567
configuration { "Debug" }
582568
defines {
@@ -694,32 +680,18 @@ else
694680
}
695681
end
696682

697-
if _OPTIONS["NOASM"]=="1" then
683+
if _OPTIONS["NOASM"] == "1" then
698684
defines {
699685
"MAME_NOASM"
700686
}
701687
end
702688

703-
if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
704-
if _OPTIONS["BIGENDIAN"]~="1" then
705-
if (_OPTIONS["PLATFORM"]=="arm64") then
706-
configuration { }
707-
defines {
708-
"NATIVE_DRC=drcbe_arm64",
709-
}
710-
else
711-
configuration { "x64" }
712-
defines {
713-
"NATIVE_DRC=drcbe_x64",
714-
}
715-
configuration { "x32" }
716-
defines {
717-
"NATIVE_DRC=drcbe_x86",
718-
}
719-
configuration { }
720-
end
721-
end
722-
689+
if _OPTIONS["FORCE_DRC_C_BACKEND"] then
690+
configuration { }
691+
defines {
692+
"NATIVE_DRC=drcbe_c",
693+
}
694+
elseif (_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64") then
723695
configuration { }
724696
defines {
725697
"ASMJIT_STATIC",
@@ -1084,9 +1056,6 @@ end
10841056
"-Wno-error=stringop-truncation", -- ImGui again
10851057
"-Wno-stringop-overflow", -- generates false positives when assigning an int rvalue to a u8 variable without an explicit cast
10861058
}
1087-
buildoptions_cpp {
1088-
"-Wno-error=class-memaccess", -- many instances in ImGui and BGFX
1089-
}
10901059
if version >= 110000 then
10911060
buildoptions {
10921061
"-Wno-nonnull", -- luaengine.cpp lambdas do not need "this" captured but GCC 11.1 erroneously insists
@@ -1107,12 +1076,6 @@ end
11071076
end
11081077
end
11091078

1110-
if (_OPTIONS["PLATFORM"]=="alpha") then
1111-
defines {
1112-
"PTR64=1",
1113-
}
1114-
end
1115-
11161079
if (_OPTIONS["PLATFORM"]=="arm") then
11171080
buildoptions {
11181081
"-Wno-cast-align",
@@ -1123,21 +1086,6 @@ if (_OPTIONS["PLATFORM"]=="arm64") then
11231086
buildoptions {
11241087
"-Wno-cast-align",
11251088
}
1126-
defines {
1127-
"PTR64=1",
1128-
}
1129-
end
1130-
1131-
if (_OPTIONS["PLATFORM"]=="riscv64") then
1132-
defines {
1133-
"PTR64=1",
1134-
}
1135-
end
1136-
1137-
if (_OPTIONS["PLATFORM"]=="mips64") then
1138-
defines {
1139-
"PTR64=1",
1140-
}
11411089
end
11421090

11431091
local subdir
@@ -1227,12 +1175,6 @@ configuration { "linux-*" }
12271175
flags {
12281176
"LinkSupportCircularDependencies",
12291177
}
1230-
if _OPTIONS["distro"]=="debian-stable" then
1231-
defines
1232-
{
1233-
"NO_AFFINITY_NP",
1234-
}
1235-
end
12361178

12371179

12381180
configuration { "freebsd or netbsd" }

docs/release/scripts/src/3rdparty.lua

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,14 +1188,16 @@ end
11881188
defines {
11891189
"PMALSA=1",
11901190
}
1191-
11921191
configuration { }
11931192

1194-
if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") and str_to_version(_OPTIONS["gcc_version"]) >= 150000 then
1193+
configuration { "gmake or ninja" }
11951194
buildoptions_c {
1196-
"-Wno-strict-prototypes",
1195+
"-Wno-unknown-pragmas",
1196+
"-Wno-unused-but-set-variable",
1197+
"-Wno-unused-function",
1198+
"-Wno-unused-variable",
11971199
}
1198-
end
1200+
configuration { }
11991201

12001202
files {
12011203
MAME_DIR .. "3rdparty/portmidi/pm_common/portmidi.c",
@@ -1232,7 +1234,6 @@ end
12321234
MAME_DIR .. "3rdparty/portmidi/pm_mac/pmmacosxcm.c",
12331235
MAME_DIR .. "3rdparty/portmidi/pm_mac/finddefault.c",
12341236
MAME_DIR .. "3rdparty/portmidi/pm_mac/readbinaryplist.c",
1235-
MAME_DIR .. "3rdparty/portmidi/pm_mac/osxsupport.m",
12361237
MAME_DIR .. "3rdparty/portmidi/porttime/ptmacosx_mach.c",
12371238
}
12381239
end
@@ -1395,12 +1396,24 @@ project "bimg"
13951396
"BX_CONFIG_DEBUG=0",
13961397
}
13971398

1398-
configuration { "x64", "mingw*", "not arm64" }
1399-
defines {
1400-
"ASTCENC_AVX=0",
1401-
"ASTCENC_SSE=20",
1402-
}
1403-
configuration { }
1399+
if _OPTIONS["gcc"]~=nil and not string.find(_OPTIONS["gcc"], "clang") then
1400+
-- This is a gross hack. For some reason GitHub Actions MinGW GCC seems to define SSE feature macros for features that are not enabled.
1401+
local archopts = (_OPTIONS["ARCHOPTS"] or "") .. " " .. (_OPTIONS["ARCHOPTS_CXX"] or "")
1402+
local ssever = "20"
1403+
if string.find(archopts, "-msse4.2") then
1404+
ssever = "42"
1405+
elseif string.find(archopts, "-msse4.1") then
1406+
ssever = "41"
1407+
elseif string.find(archopts, "-msse3") then
1408+
ssever = "30"
1409+
end
1410+
configuration { "x64", "mingw*", "not arm64" }
1411+
defines {
1412+
"ASTCENC_AVX=0",
1413+
"ASTCENC_SSE=" .. ssever,
1414+
}
1415+
configuration { }
1416+
end
14041417

14051418
configuration { "x32" }
14061419
defines {
@@ -1590,14 +1603,6 @@ end
15901603
end
15911604
end
15921605

1593-
if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then
1594-
if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then
1595-
defines {
1596-
"TARGET_OS_OSX=1",
1597-
}
1598-
end
1599-
end
1600-
16011606
files {
16021607
MAME_DIR .. "3rdparty/bgfx/src/bgfx.cpp",
16031608
MAME_DIR .. "3rdparty/bgfx/src/debug_renderdoc.cpp",
@@ -1942,7 +1947,7 @@ project "ymfm"
19421947
-- asmjit library
19431948
--------------------------------------------------
19441949

1945-
if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
1950+
if (not _OPTIONS["FORCE_DRC_C_BACKEND"]) and ((_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64")) then
19461951
project "asmjit"
19471952
uuid "4539757c-6e99-4bae-b3d0-b342a7c49539"
19481953
kind "StaticLib"
@@ -1959,14 +1964,6 @@ project "asmjit"
19591964
"ASMJIT_STATIC",
19601965
}
19611966

1962-
if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then
1963-
if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then
1964-
defines {
1965-
"TARGET_OS_OSX=1",
1966-
}
1967-
end
1968-
end
1969-
19701967
files {
19711968
MAME_DIR .. "3rdparty/asmjit/src/asmjit/a64.h",
19721969
MAME_DIR .. "3rdparty/asmjit/src/asmjit/arm.h",

docs/release/scripts/src/osd/modules.lua

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ function osdmodulesbuild()
5050
}
5151

5252
files {
53-
MAME_DIR .. "src/osd/osdnet.cpp",
54-
MAME_DIR .. "src/osd/osdnet.h",
5553
MAME_DIR .. "src/osd/watchdog.cpp",
5654
MAME_DIR .. "src/osd/watchdog.h",
5755
MAME_DIR .. "src/osd/interface/inputcode.h",
@@ -111,6 +109,8 @@ function osdmodulesbuild()
111109
MAME_DIR .. "src/osd/modules/monitor/monitor_module.h",
112110
MAME_DIR .. "src/osd/modules/monitor/monitor_sdl.cpp",
113111
MAME_DIR .. "src/osd/modules/monitor/monitor_win32.cpp",
112+
MAME_DIR .. "src/osd/modules/netdev/netdev_common.cpp",
113+
MAME_DIR .. "src/osd/modules/netdev/netdev_common.h",
114114
MAME_DIR .. "src/osd/modules/netdev/netdev_module.h",
115115
MAME_DIR .. "src/osd/modules/netdev/none.cpp",
116116
MAME_DIR .. "src/osd/modules/netdev/pcap.cpp",
@@ -497,14 +497,23 @@ function osdmodulestargetconf()
497497
"Qt5Widgets.dll",
498498
}
499499
elseif _OPTIONS["targetos"]=="macosx" then
500+
local qt_version = str_to_version(backtick("qmake -query QT_VERSION"))
500501
linkoptions {
501502
"-F" .. backtick("qmake -query QT_INSTALL_LIBS"),
502503
}
503-
links {
504-
"Qt5Core.framework",
505-
"Qt5Gui.framework",
506-
"Qt5Widgets.framework",
507-
}
504+
if qt_version < 60000 then
505+
links {
506+
"Qt5Core.framework",
507+
"Qt5Gui.framework",
508+
"Qt5Widgets.framework",
509+
}
510+
else
511+
links {
512+
"QtCore.framework",
513+
"QtGui.framework",
514+
"QtWidgets.framework",
515+
}
516+
end
508517
else
509518
if _OPTIONS["QT_HOME"]~=nil then
510519
local qt_version = str_to_version(backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_VERSION"))

docs/release/src/emu/ioport.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ void digital_joystick::frame_update()
522522
m_current4way &= ~(UP_BIT | DOWN_BIT);
523523
}
524524
}
525+
else
526+
m_current4way &= m_current;
525527
}
526528

527529

docs/release/src/frontend/mame/ui/miscmenu.cpp

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "infoxml.h"
2121
#include "mame.h"
2222

23-
#include "osdnet.h"
2423
#include "mameopts.h"
2524
#include "pluginopts.h"
2625
#include "dinetwork.h"
@@ -29,6 +28,8 @@
2928
#include "romload.h"
3029
#include "uiinput.h"
3130

31+
#include "osdepend.h"
32+
3233
#include "path.h"
3334

3435
#include <algorithm>
@@ -172,17 +173,17 @@ void menu_network_devices::populate()
172173
for (device_network_interface &network : network_interface_enumerator(machine().root_device()))
173174
{
174175
int curr = network.get_interface();
175-
const char *title = nullptr;
176-
for (auto &entry : get_netdev_list())
176+
std::string_view title;
177+
for (auto &entry : machine().osd().list_network_devices())
177178
{
178-
if (entry->id == curr)
179+
if (entry.id == curr)
179180
{
180-
title = entry->description;
181+
title = entry.description;
181182
break;
182183
}
183184
}
184185

185-
item_append(network.device().tag(), title ? title : "------", FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW, (void *)&network);
186+
item_append(network.device().tag(), std::string(!title.empty() ? title : "------"), FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW, (void *)&network);
186187
}
187188

188189
item_append(menu_item_type::SEPARATOR);
@@ -200,30 +201,34 @@ bool menu_network_devices::handle(event const *ev)
200201
}
201202
else if (ev->iptkey == IPT_UI_LEFT || ev->iptkey == IPT_UI_RIGHT)
202203
{
203-
// FIXME: this conflates presumably arbitrary interface ID numbers with 0-based indices
204204
device_network_interface *const network = (device_network_interface *)ev->itemref;
205-
auto const &interfaces = get_netdev_list();
205+
auto const interfaces = machine().osd().list_network_devices();
206206
int curr = network->get_interface();
207+
auto const found = std::find_if(
208+
std::begin(interfaces),
209+
std::end(interfaces),
210+
[curr] (osd::network_device_info const &info) { return info.id == curr; });
211+
auto index = std::distance(interfaces.begin(), found);
207212
if (ev->iptkey == IPT_UI_LEFT)
208-
curr--;
209-
else
210-
curr++;
211-
if (curr == -2)
212-
curr = interfaces.size() - 1;
213-
network->set_interface(curr);
213+
--index;
214+
else if (std::end(interfaces) == found)
215+
index = 0;
216+
else if (std::size(interfaces) <= ++index)
217+
index = -1;
218+
network->set_interface((0 <= index) ? interfaces[index].id : -1);
214219

215220
curr = network->get_interface();
216-
const char *title = nullptr;
221+
std::string_view title;
217222
for (auto &entry : interfaces)
218223
{
219-
if (entry->id == curr)
224+
if (entry.id == curr)
220225
{
221-
title = entry->description;
226+
title = entry.description;
222227
break;
223228
}
224229
}
225230

226-
ev->item->set_subtext(title ? title : "------");
231+
ev->item->set_subtext(!title.empty() ? title : "------");
227232
return true;
228233
}
229234
else

0 commit comments

Comments
 (0)