diff options
| author | 2023-01-29 03:02:02 +1100 | |
|---|---|---|
| committer | 2023-01-29 03:16:14 +1100 | |
| commit | 68472d3d72ea4bbc545c0669348172b4e96c7b41 (patch) | |
| tree | e34fca0f55c977624148d1c806ecc6c44a5edd11 /scripts | |
| parent | 01fcb2e0decf670a4cdee3d37b6f7ebde9b8f02b (diff) | |
Various input and OSD refactoring:
osd: Supply OSD object to modules on initialisation. Encapsulated some
event handling in the OSD objects rather than leaving it in free
functions. Put various stuff in namespaces.
osd/modules/input: Enabled dinput, xinput and winhybrid modules for
Windows SDL builds, and enabled background input for dinput and xinput
(and by extension winhybrid) modules. Also fixed some COM and X11
resource leaks.
osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match
Windows, and exposed vertical and horizontal scroll as Z and rZ axes.
Moved SDL UI event handling out of input devices into OSD object.
osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's
correctly identified as a relative axis (it maps to the scroll wheel
equivalent).
osd: Added an option to choose the network provider module. Mostly
useful if you build with both TUN/TAP and pcap support included, or if
you want to disable emulated networking completely.
emu/input.cpp: Use a better strategy for assembling input code names
that uses fewer temporary strings and doesn't require use of the
non-Unicode-aware space trimming function (fixes MT08552).
osd/modules/input_dinput.cpp: Improved polling logic.
osd: Made various parts of the input code less dependent on concrete emu
objects, and reduced inappropriately passing around the machine object.
Made input modules less dependent on OSD implementation. Encapsulated
some stuff and got rid of some vestigial newui and SDL1 support code.
Cleaned up some interfaces. Moved OSD options classes to their own
files.
Prepare to remove main.h from emu.h - it's mostly used to get the
application name, which the vast majority of emulated devices don't need
to do.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/src/osd/modules.lua | 3 | ||||
| -rw-r--r-- | scripts/src/osd/sdl.lua | 14 | ||||
| -rw-r--r-- | scripts/src/osd/windows.lua | 3 |
3 files changed, 12 insertions, 8 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index d1769833efa..a6f8a7db820 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -102,9 +102,8 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/input/input_rawinput.cpp", MAME_DIR .. "src/osd/modules/input/input_win32.cpp", MAME_DIR .. "src/osd/modules/input/input_sdl.cpp", - MAME_DIR .. "src/osd/modules/input/input_sdlcommon.cpp", - MAME_DIR .. "src/osd/modules/input/input_sdlcommon.h", MAME_DIR .. "src/osd/modules/input/input_x11.cpp", + MAME_DIR .. "src/osd/modules/input/input_wincommon.h", MAME_DIR .. "src/osd/modules/input/input_windows.cpp", MAME_DIR .. "src/osd/modules/input/input_windows.h", MAME_DIR .. "src/osd/modules/input/input_xinput.cpp", diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index a110cce6f4f..4c6a979f952 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -100,6 +100,7 @@ function maintargetosdoptions(_target,_subtarget) configuration { } end links { + "dinput8", "psapi", } elseif _OPTIONS["targetos"]=="haiku" then @@ -426,16 +427,19 @@ project ("osd_" .. _OPTIONS["osd"]) end files { + MAME_DIR .. "src/osd/osdepend.h", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", + MAME_DIR .. "src/osd/modules/render/drawsdl.cpp", + MAME_DIR .. "src/osd/sdl/osdsdl.cpp", MAME_DIR .. "src/osd/sdl/osdsdl.h", - MAME_DIR .. "src/osd/sdl/sdlprefix.h", MAME_DIR .. "src/osd/sdl/sdlmain.cpp", - MAME_DIR .. "src/osd/osdepend.h", + MAME_DIR .. "src/osd/sdl/sdlopts.cpp", + MAME_DIR .. "src/osd/sdl/sdlopts.h", + MAME_DIR .. "src/osd/sdl/sdlprefix.h", MAME_DIR .. "src/osd/sdl/video.cpp", MAME_DIR .. "src/osd/sdl/window.cpp", MAME_DIR .. "src/osd/sdl/window.h", - MAME_DIR .. "src/osd/modules/osdwindow.cpp", - MAME_DIR .. "src/osd/modules/osdwindow.h", - MAME_DIR .. "src/osd/modules/render/drawsdl.cpp", } files { MAME_DIR .. "src/osd/modules/render/draw13.cpp", diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index de1da102f85..be91ec26237 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -142,9 +142,10 @@ project ("osd_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/windows/window.h", MAME_DIR .. "src/osd/modules/osdwindow.cpp", MAME_DIR .. "src/osd/modules/osdwindow.h", - MAME_DIR .. "src/osd/windows/winmenu.cpp", MAME_DIR .. "src/osd/windows/winmain.cpp", MAME_DIR .. "src/osd/windows/winmain.h", + MAME_DIR .. "src/osd/windows/winopts.cpp", + MAME_DIR .. "src/osd/windows/winopts.h", MAME_DIR .. "src/osd/osdepend.h", MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.cpp", MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.h", |
