summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd
Commit message (Collapse)AuthorAgeFilesLines
* osd: Cleaned up MIDI and network interfaces a little more. Vas Crabb2024-03-011-0/+1
|
* osd/osdnet.cpp: Removed dependency from OSD network device to libemu. (#12058) Vas Crabb2024-02-251-0/+2
| | | | * This allows save states to be created and loaded when network interfaces are present. * device_network_interface may need some more attention to get save states taken while receiving a packet to work properly.
* macOS: Xcode 15 requires explicitly setting -rpath to find the SDL ↵ arbee2023-10-011-0/+1
| | | | framework. [R. Belmont, Carbon]
* render/drawbgfx.cpp: Added initial support for Wayland on Linux. (#11451) Julian Sikorski2023-09-292-0/+21
|
* modules.lua: Remove stray MOC setting after the Qt6 Linux support change ↵ Jindřich Makovička2023-07-181-1/+0
| | | | (#11419)
* Allow the use of either Qt5 or Qt6 on Linux (#11413) Jindřich Makovička2023-07-141-10/+26
| | | | | | * Look for MOC in QT_HOME/libexec if not found in QT_HOME/bin * Use the Qt6* libraries if the Qt version is >= 6 * Switch the include paths for QAction & QActionGroup for Qt >= 6 * Replace the deprecated + operator for keys with |
* osd/mac: Make compile again. Does not yet start up because BGFX tries to ↵ arbee2023-07-091-0/+1
| | | | force OpenGL. [R. Belmont]
* Removed local copy of SDL source and update Android build support. (#10899) Miodrag Milanović2023-02-273-95/+53
| | | | | | | | | * Removed SDL2 source. * Updated gradle. * Updated SDL2 Java support glue code. * Increased minimum supported Android API version to 24. * Updated required asset files for Android app. * Added proper tag for Android logging. * Added SDL2 hint to make BGFX work on Android.
* Input refactoring: Vas Crabb2023-02-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | osd/modules/input, emu/inpttype.cpp: Made most default joystick assignments supplied by input modules. Input modules take available controls into consideration when generating default assignments. emu/inpttype.ipp: Added a separate "Back" UI input separate from Cancel. You may want an easier to hit combination for moving to the previous menu than for exiting or cancelling input. They both default to Escape. emu/inpttype.ipp: Added a UI Help control. Currently only used by analog inputs menu emu/inpttype.h: Moved I/O port field type enum to its own header and sorted UI controls so they appear in a more logical order. ui: Don't use UI Select to restore defaults - people should be getting used to the UI Clear input by now. UI Select cycles multi-value items instead. ui/inputmap.cpp: Don't use immediate cancel to cycle between clearing and restoring default assignment (use UI Clear instead). osd: Reduced the number of files needing to include the dreaded emu.h. Got some implementation out of headers.
* Small batch of input refactoring: Vas Crabb2023-02-051-0/+2
| | | | | | | | | | | | | | | | | | | | | emu/input.cpp: Fixed regression in display of some joystick inputs. osd/interface: Split up interface classes into a few more files to reduce where the input device interface class needs to be included. Made OSD independent of concrete input_device class. osd/modules/input, emu/inputdev.cpp, emu/ioport.cpp: Allow input devices to provide tokens for controls without standard item types and additional default input assignments. Fixes issues assigning Yen and Backslash on Japanese keyboards. ui/textbox.cpp: Added a fixed-content text box menu class for future use. Got main.h out of emu.h as it’s only used in a very small number of places, mostly for getting the application name. Added eminline.h to attotime.h as it's used without emu.h. Cleaned up forward declarations in emufwd.h a little.
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-013-52/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ignore the return status of OSD module initialisation. Attempt to fall back to an alternate module if the selected module fails to initialise. Log more useful diagnostic information at verbose level. Fixed BGFX crash on exit after toggling fullscreen. Also persist more settings than just the selected chains across toggling fullscreen. Turned video modules into OSD modules in the same sense as all the other OSD modules. They now use the same selection/fallback mechanism as all the other modules without special extra code in the OSD implementations. Untangled some object ownership mess. Windows own renderers, OSD objects own windows. Fixed a refrence loop that caused the first window object to always leak. Don't create renderer object until after underlying window has been created. Fixed issues with order of creation/destruction when toggling fullscreen or changing prescale in fullscreen with -switchres in SDL builds. Use more smart pointers in BGFX and Direct3D render modules. Most of the code now reutrns a smart pointer when handing over ownership or a naked pointer when retaining ownership. Fixed a few leaks and simplified cleanup code. Encapsulated various OSD modules better.
* Various input and OSD refactoring: Vas Crabb2023-01-293-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Miscellaneous fixes and refactoring: Vas Crabb2023-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui/analogipt.cpp: Fixed bar graph display for fields with ranges that wrap through zero. emu/inputdev.cpp: Separateed analog axis deadzone and switch threshold settings, reduced default deadzone, and fixed a potential division by zero if the deadzone and saturation settings are equal. emu/ioport.cpp: Fixed behaviour of absolute analog fields where range passes through zero - it previously only worked for specific combinations of mask, minimum and default. Removed a workaround from universal/getaway.cpp that is no longer necessary. emu/input.cpp: Fixed unintuitive behaviour when an absolute field is assigned an OR combination of a relative control folled by an absolute control (e.g. Mouse X or Joy 1 LSX). Also fixed reading axis input sequences where an axis code is followed by a switch code (these can only be produced by manually editing configuration files, not through MAME's UI), and fixed the returned type when multiple relative axes sum to zero. osd/modules/input_dinput.cpp: Fixed hat switches being stuck in up position when input is suspended in the background taito/taitoio_yoke.cpp: Give throttle control a distinct type, and don't auto-centre. osd: Added option to select MIDI provider module (currently only PortMidi and the dummy module are available). Also put various things in namespaces, and fixed builds including SDL sound module with native Windows OSD. emu/validity.cpp: Added check to catch I/O port fields using UI input types. emu/inpttype.ipp: Renamed inputs that were causing confusion. "Bill" and "Track" were causing confusion for translators and hence likely causing confusion for many users, especially those who are not native English speakers. "Track" as an abbreviation for "Trackball" was frequently being mistranslated, e.g. in the sense of a CD track selection button or even in the sense of a railway track. There's no reason to abbreviate it. "Bill" in the US English sense as a banknote is too ambiguous and was causing confusion for translators. It's better to use the less ambiguous "Banknote". Corrected Greek translations of "Trackball". Don't run GitHub Actions on issue template changes.
* Update BGFX, BX and BIMG (#10789) Miodrag Milanović2023-01-052-0/+2
| | | | * Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Revert "Update BGFX, BX and BIMG (#10750)" (#10787) R. Belmont2023-01-041-1/+0
| | | This reverts commit 5581eaa50a42256242f32569f59ce10d70ddd8c2 due to link failure on macOS.
* Update BGFX, BX and BIMG (#10750) Miodrag Milanović2023-01-041-0/+1
| | | | * Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* -debugger: Improved session save/restore. Vas Crabb2022-12-021-5/+3
| | | | | | | | | | | | * Qt: Save expression for memory and disassembly views. * Qt: Made command history behave more like Cocoa. * Qt: Added expression history and made behaviour more like Cocoa. * Qt: Refactored global notifications to use signals. * Win32: Increased command/expression history size to 100 items. * Cocoa: Save state of device info viewer windows. * Qt/Win32/Cocoa: Save command/expression history. -util/xmlfile.cpp: Fixed bug where copyInto failed to copy nodes.
* Debugger updates: Vas Crabb2022-09-201-9/+9
| | | | | | | | | | | | | | | | | | | | | | | Made closing the Qt debugger console window hide all debugger windows and run the emulated machine (debugger windows will be shown on next user break or breakpoint hit). This matches the behaviour of the Win32 and Cocoa debuggers. Made Qt debugger clean up its windows on exit rather than on subsequent starts. This fixes GitHub #9789. Made Qt debugger less reliant on global variables, and made code to save and load configuration a bit less convoluted. It still needs more refactoring on this front, but it's in slightly better shape now. Made Qt debugger a bit less crashy on invalid configuration. Still plenty of ways to crash it, but every little bit counts. Made Qt debugger do less comparisons on menu item names and object names - it might be possible to localise one day. Moved all the C++ debugger implementations into namespaces. They're using awfully generic class names, so it's about time.
* debugger/win: Added capability to save/restore window arrangement. Vas Crabb2022-09-161-0/+2
| | | | | | | | | * Format is mostly compatible with the Cocoa debugger, besides reversed vertical positioning. * Made Qt debugger more compatible with configuration format used by Win32 and Cocoa debuggers. * emu/config.cpp: Preserve elements with no registered handlers in default and system configuation files.
* Patched up some gaps in functionality and fixed some bugs. Vas Crabb2022-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui: Added some missing functionality: * Added an option to copy input device IDs to the relevant menus. * Added an item for setting the software lists files path (-hashpath) to the folder setup menu. * Allow pasting text from clipboard in most places that allow typing (searching, entering filenames, entering barcodes). * Changed the software selection menu heading to be a bit less misleading. * Made barcode menu less eager to rebuild itself unnecessarily, and removed some confusing and apparently pointless code. Exposed more Lua bindings: * Added low-level palette objects. * Added indexed bitmap types. * Added a bitmap method for extracting pixels from a rectangular area as a packed binary string. * Changed screen device pixels method to return width and height in addition to the pixels. osd: Added some functionality and cleaned up a little: * Added a function for copying text to the clipboard. * Moved function for converting Windows error codes to standard error conditions to winutil.cpp so it can be used from more places. * Removed duplicate declaration of osd_get_clipboard_text and made the function noexcept (including fixing implementations). * Made macOS implementation of osd_get_clipboard_text skip the encoding conversion if it finds UTF-8 text first. * Changed the default -uimodekey setting so it doesn't lose the "not shift" that stops the default from interfering with UI paste. Various bug fixes: * util/unicode.cpp: Fixed the version of utf8_from_uchar that returns std::string blowing up on invalid codepoints. * util/bitmap.h: Fixed wrapping constructors for indexed bitmaps taking the wrong parameter type (nothing was using them before). * util/bitmap.cpp: Fixed potential use-after-free issues with bitmap palettes. * emu/input.cpp, emu/inputdev.cpp: Log 1-based device numbers, matching what's shown in the internal UI and used in tokens in CFG files. * emu/emumem.cpp: Added the bank tag to a fatal error message where it was missing. docs: Reworked and expanded documentation on configuring stable controller IDs. For translators, the changes are quite minor: * There's a menu item for copying a device ID to the clipboard, and associated success/failure messages. * There's the menu item for setting the software list file search path. * One of the lines in the software selection menu heading has changes as it could be interpreted as implying it showed a software list name.
* Optimisation, and baby steps towards untangling stuff: Vas Crabb2022-06-161-0/+5
| | | | | | | | | | Optimised the scheduler's handling of unscheduled timers - gives a 50% performance improvement in some timer-heavy drivers. Added better endianness swizzling helpers. Got rid of some of the OSD input modules' dependence on concrete input classes from emu.
* osd: Cleaned up Windows API usage a little. Vas Crabb2022-05-262-3/+5
| | | | | | | | | * Bumped target windows version to 6.0.0 (Vista). * Use WRL COM pointers to manage some COM-like objects. * Cleaned up logging in DirectSound module. * Cleaned up includes in Windows input modules. * Switched to Common Item Dialogs in Windows debugger. * Replaced disabled code that never really worked with a TODO comment.
* clang fixes smf-2021-11-191-0/+6
|
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-262-7/+0
|
* Remove uwp specific sources Miodrag Milanovic2021-10-261-1/+0
|
* Remove uwp from build system Miodrag Milanovic2021-10-262-142/+0
|
* Add new files to SDL OSD as well as Mac OSD. Vas Crabb2021-10-181-0/+2
|
* Still more user experience improvements: Vas Crabb2021-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the default mapping for UI select to not trigger on Alt+Enter fullscreen toggle. (Fullscreen toggle still doesn't work in menus - actually fixing that is complicated.) frontend: Made the about box wrap text properly, made the title and backtrack menu item always visible, and added a footer with the VCS revision. frontend: Don't highlight the favourites and info toolbar buttons if there's no selection (can happen if filters produce no results). Also made the info viewer appear even if no info is available - it's less confusing to see an empty menu than wonder why clicking the button does nothing. debugger: Added a register points view to the GUI debuggers, to go with the breakpoints and watchpoints views. debugger: Extended [brw]p(clear|(en|dis)able) commands to accept multiple arguments to perform the same action on multiple (break|watch|register)points at once. Also made rplist accept a CPU for showing a single CPU's register points ([bw]plist already support this). docs: Updated registerpoints debugger commands page, and updated other pages for latest extensions to syntax.
* fixed vs2019, broken by clang fix. smf-2021-09-091-3/+5
|
* fixes for building with clang 12.0.1 on windows smf-2021-09-041-0/+4
|
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-222-2/+0
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* Compile bgfx Miodrag Milanovic2021-08-101-1/+0
|
* Slightly cleaned up OSD input modules. Vas Crabb2021-07-291-34/+2
| | | | | | | | | | Removed support for DirectInput 7 and earlier. It hasn't been tested in years, and it's not relevant on any supported OS. DirectInput is effectively finalised at version 8, and is unlikely to get an API update in the future. Use more string[_view] and fewer C strings, and tightened up scope of a few things.
* Added helpers for 64-bit count leading zeroes/ones. Vas Crabb2021-06-131-0/+1
|
* fix pcap builds (#8150) [xray-sky, R. Stricklin] xray-sky2021-06-063-3/+3
|
* sound: Pulseaudio support Olivier Galibert2021-04-161-0/+29
|
* Low-level #include overhaul AJR2021-01-023-0/+3
| | | | | | | - vecstream.h: Revert changes made in aa29519528cb3dbdbfac56819bea670ed8c56c5d. The std::string_view conversion has been made a non-member function (util::buf_to_string_view) and moved to coretmpl.h. - strformat.h: Remove the using declaration importing util::string_format into the global namespace. It has been moved to emucore.h and a few tool sources; other references have been qualified. - osdcore.h: Split out file, directory and path classes and methods to a new header (osdfile.h), Doxygenizing the documentation comments. - Disaggregate many #includes that were including other standard or custom headers. emu.h now includes basically the same things that it did, but other headers have been streamlined; for instance, emucore.h no longer stealth-includes osdcore.h several ways.
* Add AudioToolbox framework when building SDL2 on macOS, fixes TOOLS=1 link ↵ arbee2020-12-131-0/+1
| | | | errors [R. Belmont]
* -bgfx: Corrected a data overrun in the d3d12 backend from allocating only ↵ Ryan Holtz2020-06-201-0/+38
| | | | enough texture data for width*height, not rowpixels*height. [Ryan Holtz]
* Removed winpcap and cleaned up network module selection. Vas Crabb2020-03-056-17/+66
| | | | | | | | (nw) The pcap.h header itself has the problematic original BSD license, including the obnoxious advertising clause. Using tap/tun networking on Windows provides a much better experience, so the extra setup is worth it. This patch also allows you to enable pcap on platforms where it's disabled by default with USE_PCAP=1 if you really want to use it.
* Odroid n2 build fixes (#5751) Julian Sikorski2019-10-181-0/+6
| | | | | | | | | | | | * Allow specifying NO_OPENGL manually * Switch bgfx to OpenGL ES renderer if NO_X11 is specified * Only link against EGL when NO_X11 is specified on linux, netbsd and openbsd * Only switch bgfx to OpenGL ES on linux, netbsd and openbsd * Indentation fix
* Add include folder 3rdparty/bgfx/3rdparty/khronos too (nw) yz70s2019-10-131-0/+1
|
* srcclean (nw) Vas Crabb2019-09-222-2/+2
|
* Preliminary Mac native OSD. Not working yet. [R. Belmont] arbee2019-09-153-0/+208
| | | | | | | | This will compile, link, and run a driver all the way to the first info screen, provided you use -video bgfx. However, although there's a valid NSWindow created, it never actually appears on screen for unknown (but likely silly) reasons. Inputs are not implemented and fullscreen exists but is untried.
* asmjs: avoid explicitly linking SDL2_ttf. 68bit2019-08-281-1/+1
| | | | | | It appears that it is sufficient to include `-s USE_SDL_TTF=2`, and emcc links in the SDL2_tff library, and it does not like attempts to link this twice.
* asmjs: can not ignore errors on missing libraries 68bit2019-08-281-1/+1
| | | | | | | | | | The current Emscripten release is not happy with the use of "-s ERROR_ON_MISSING_LIBRARIES=0" as a link option, it gives an error stating that all libraries must now be present, so remove that use. This leaves a missing 'util' library. This did not appear to be needed on the few builds I have tried, and this patch avoids adding this library for asmjs.
* gdbstub: added new GDB stub debugger (#5456) Ramiro Polla2019-08-111-0/+1
| | | | | | | | | | | | * gdbstub: added new GDB stub debugger This debugger can be used to connect to an external debugger that communicates using the GDB Remote Serial Protocol, such as GDB itself or many other GDB frontends. Currently i386 (ct486), arm7 (gba), and ppc (pmac6100) are supported. * gdbstub: enable GDB stub debugger in mac and windows builds
* fix vsllvm configuration feos2019-06-031-0/+1
| | | | | | - dxsdk was missing from includes - winmm was missing from libs - narrowing warning was silenced for VS, but not from vsllvm, where it leads to an error in menu_video_options::handle()
* Disable WII Lightgun hack by default (#5056) Kiall Mac Innes2019-05-142-0/+23
|
* Enable Xinput by default Kiall Mac Innes2019-04-211-1/+5
| | | | | | | On Linux, enable Xinput support by default. The Xinput lightgun driver is the only reliable+accurate method to use lightguns on Linux, we should enable this by default to reduce the friction for Linux Lightgun users. This should have no effect on users of Windows/Mac etc.