summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules
Commit message (Collapse)AuthorAgeFilesLines
* Various improvements to image file handling: Vas Crabb2020-10-082-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | Moved MS DIB parser out of ICO file reader and made it available for artwork and layout images. Added more efficient I/O and better error checking for JPEG file loading (MAME will no longer exit immediately on a bad JPEG file). Made caller responsible for opening files for loading images, to avoid decompressing images used in ZIP/7z artwork multiple times. Added support for JPEG and Windows DIB to picture_image_device. Added support for SVG image files in external artwork. Added support for using I/O port value for animation state and masking animation state values. Made bounds elements more flexible in layouts. Reworked headers to reduce dependencies. Updated layout file format documentation.
* Fix stray space char in osd_opengl.h Miodrag Milanović2020-10-031-1/+1
|
* emu/render.cpp: Consider that screens can be hidden when choosing a default ↵ Vas Crabb2020-10-032-2/+2
| | | | view.
* Got rid of global_alloc/global_free. Vas Crabb2020-10-0327-199/+154
| | | | | | | | | | | | | | | | | | | | | | | | | The global_alloc/global_free functions have outlived their usefulness. They don't allow consistently overriding the default memory allocation behaviour because they aren't used consistently, and we don't have standard library allocator wrappers for them that we'd need to use them consistently with all the standard library containers we're using. If you need to change the default allocator behaviour, you can override the new/delete operators, and there are ways to get more fine-grained control that way. We're already doing that to pre-fill memory in debug builds. Code was already starting to depend on global_alloc/global_free wrapping new/delete. For example some parts of the code (including the UI and Windows debugger) was putting the result of global_alloc in a std::unique_ptr wrappers without custom deleters, and the SPU sound device was assuming it could use global_free to release memory allocated with operator new. There was also code misunderstanding the behaviour of global_alloc, for example the GROM port cartridge code was checking for nullptr when a failure will actually throw std::bad_alloc. As well as substituting new/delete, I've made several things use smart pointers to reduce the chance of leaks, and fixed a couple of leaks, too.
* -Got rid of most of the remaining problematic uses of make_unique_clear. Vas Crabb2020-09-304-4/+4
| | | | -sound/discrete.cpp: Use C++ std::vector and range-based for.
* FreeBSD fixes (#7295) Emmanuel Vadot2020-09-271-1/+1
| | | | | | | | | | | | * psixptty: Fix for FreeBSD We need to check for __FreeBSD__ not __FreeBSD_kernel__ * FreeBSD: Use gl includes from pkg-config FreeBSD doesn't install the includes from 3rdparty software in a default location so use pkg-config to get the correct path. * FreeBSD: genieos is named simple bsd
* Cleaned up bitmap API. Vas Crabb2020-09-275-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return const-qualified references/pointers to pixesl, and added non-const versions. This makes bitmap more like standard library containers where const protects the content as well as the dimensions. Made the templated pixt accessor protected - having it public makes it too easy to inadvertently get a pointer to the wrong location. Removed the pix(8|16|32|64) accessors from the specific bitmaps. You could only use the "correct" one anyway, and having the "incorrect" ones available prevented explicit instantiations of the class template because the static assertions would fail. You can still see the pixel type in the bitmap class names, and you can't assign the result of &pix(y, x) to the wrong kind of pointer without a cast. Added fill member functions to the specific bitmap template, and added a explicit instantiations. This allows the bitmap size check to be skipped on most bitmap fills, although the clipping check is still there. Also fixed a couple of places that were trying to fill an indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with zero to get the same net effect). The explicit template instantiations in the .cpp file mean the compiler can inline the function if necessary, but don't need to generate a local out-of-line body if it chooses not to. Extended the size of the fill value parameter in the base bitmap class to 64 bits so it works correctly for 64-bit bitmaps. Fixed places where IE15 and VGM visualiser weren't accounting for row bytes potentially being larger than width. Fixed an off-by-one in an HP-DIO card where it was treating the Topcat cursor right edge as exclusive. Updated everything to work with the API changes, reduced the scope of many variables, added more const, and replaced a few fill/copy loops with stuff from <algorithm>.
* -util/xmlfile: Escape attribute and element content. Vas Crabb2020-09-063-3/+3
| | | | | | | | | | | | | | | | | | | | The previous behaviour was unintuitive - parsing an XML file and writing it out immediately would produce invalid XML if the file contained any characters that needed escaping. It makes far more sense to escape on writing rather than expecting the user to escape input. -Add preliminary support for visibility toggles to artwork system. This allows the user to show/hide related elements in a view, with nesting. The view can specify whether elements are shown or hidden by default. Settings are saved per host window/screen per view. There is no way to set the initial visibility state on the command line. Legacy "Space Invaders cabinet model" layers are mapped onto visibility toggles. This is not stable yet. In particular, the XML element/attribute names have not been finalised. The new features have not been added to complay.py to prevent them from being used before they're finalised.
* drawd3d: properly clean up d3dintf (nw) hap2020-06-211-0/+3
|
* -bgfx: Don't try to invoke a frame immediately after resetting the renderer ↵ Ryan Holtz2020-06-201-2/+2
| | | | during tear-down. Fixes crash on exit with the d3d12 backend. [Ryan Holtz]
* -bgfx: Corrected a data overrun in the d3d12 backend from allocating only ↵ Ryan Holtz2020-06-2012-20/+28
| | | | enough texture data for width*height, not rowpixels*height. [Ryan Holtz]
* looks like I64 size qualifier is only needed for MSYS64 GCC 9 and earlier (nw) Vas Crabb2020-06-022-2/+2
|
* MAME Testers Bugs Fixed Ryan Holtz2020-05-282-169/+86
| | | | | | | ----------------------- 07536: [Graphics] Prescale option does not work properly on D3D renderer (Ryan Holtz) -renderer/d3d: Removed old StretchRect code. All drivers these days punt it to a shader backend anyway, and it's causing issues with -prescale. [Ryan Holtz]
* Last memory change fixes (nw) Olivier Galibert2020-05-252-5/+6
|
* Debugger expression and memory access overhaul AJR2020-05-2519-115/+149
| | | | | | | | | | | | | - Memory references in expressions no longer default to the console's visible CPU if no device name was specified, except when entered through the console itself. Expressions in view windows now use the context of the currently selected device instead. - The pcatmem debug command and similar qt mouseover function now produce an error message if the initial address translation fails. Related internal changes (nw) - The debugger_cpu class no longer interprets memory accesses. The existing routines have been moved into symbol_table (which used to invoke them as callbacks), and reimplemented in most other places. Thecode duplication is a bit messy, but could be potentially improved in the future with new utility classes. - The cheat engine no longer needs to hook into the debugger_cpu class or instantiate a dummy instance of it. - The inclusion of debug/express.h within emu.h has been undone. Some debugging structures now need unique_ptr to wrap the resulting incomplete classes; hopefully the performance impact of this is negligible. Another direct consequence is that the breakpoint, watchpoint and registerpoint classes are no longer inside device_debug and have their own source file. - The breakpoint list is now a std::multimap, using the addresses as keys to hopefully expedite lookup. - The visible CPU pointer has been removed from the debugger_cpu class, being now considered a property of the console instead. - Many minor bits of code have been simplified.
* OS X debugger: Avoid crashing when a nonexistent disassembly or memory view ↵ AJR2020-04-202-9/+18
| | | | is selected (which may happen automatically with .cfg files)
* font_osx.cpp: Why does Apple even have these macros? They're not expected to ↵ AJR2020-04-081-2/+2
| | | | be defined on older MacOS versions... (nw)
* Mac: Use Arial Unicode MS as the default font (fixes missing glyphs in many ↵ arbee2020-04-081-1/+25
| | | | layouts) and fixed deprecation warnings [R. Belmont]
* Revert "fixed some modernize-use-equals-default clang-tidy warnings (… (#6360) Oliver Stöneberg2020-04-0822-25/+27
| | | | | | | * Revert "fixed some modernize-use-equals-default clang-tidy warnings (nw)" This reverts commit 54486ab9 * fixed merge error
* Hey Travis, go test that for me, thanks (nw) Olivier Galibert2020-03-312-0/+6
|
* Fix some deprecations (nw) Olivier Galibert2020-03-312-3/+3
|
* copy-paste error (nw) Vas Crabb2020-01-311-1/+1
|
* there are reasons for things being the way they were (nw) Vas Crabb2020-01-3123-16/+88
|
* fixed some modernize-use-auto clang-tidy warnings (nw) (#6238) Oliver Stöneberg2020-01-3032-101/+101
|
* fixed some modernize-use-equals-default clang-tidy warnings (nw) (#6237) Oliver Stöneberg2020-01-3042-109/+35
|
* fixed some clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-3010-29/+29
| | | | | | | | | | | | | | | | * fixed some modernize-redundant-void-arg clang-tidy warnings (nw) * fixed some modernize-use-bool-literals clang-tidy warnings (nw) * fixed some modernize-use-emplace clang-tidy warnings (nw) * fixed some performance-move-const-arg clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* Revert accidentally committed changes. (nw) couriersud2020-01-251-17/+5
|
* segas16b: Added analog filters. [Couriersud] couriersud2020-01-251-5/+17
| | | | Analog filters added to systems with YM2151 and UPD7759. Reviewers can use USE_NL define to produce unfiltered sound.
* fix build with clang 9.0.0 on windows smf-2020-01-241-1/+1
| | | | | | ../../../../../src/osd/modules/input/input_winhybrid.cpp:107:16: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] : m_variant({0})
* Merge pull request #6195 from firewave/includes R. Belmont2020-01-2229-49/+49
|\ | | | | use C++ library includes (nw)
| * use C++ library includes (nw) firewave2020-01-2229-49/+49
| |
* | fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-2211-22/+22
|/ | | | | | | | | | | | | | * fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* input_sdl: Process control characters so that the natural keyboard can see ↵ AJR2020-01-101-0/+13
| | | | | | them (SDL normally strips these out) Don't strip linefeed characters (Ctrl-J) from natural keyboard input except when pasting strings
* video: higher maximum prescale (nw) hap2020-01-051-1/+1
|
* opengl: clamp to edge, same as the other renderers (nw) hap2020-01-041-8/+8
|
* Happy New Year 2020 (nw) (#6128) Stiletto2020-01-041-1/+1
| | | Happy New Year 2020 (nw) (#6128)
* render/bgfx: Fix incorrect swapping of red and blue components of screen tint AJR2019-12-311-1/+1
|
* Changed Direct3D renderer to call GetAncestor() in device_create() to npwoods2019-12-221-1/+5
| | | | | | get the root window This is to make -attach_window work with non-root windows
* save/restore otuput values in save states Vas Crabb2019-12-131-8/+5
|
* input_sdl.cpp: Ignore joystick buttons beyond maximum supported number. Vas Crabb2019-12-071-2/+5
| | | | * Note that the code to map excess buttons to switches doesn't actually do anything useful while INPUT_MAX_BUTTONS and MAX_BUTTONS happen to be defined to the same number.
* netlist: Revert development code committed by accident. (nw) couriersud2019-11-261-13/+2
|
* netlist: move nl_examples to src/lib/netlist/examples. (nw) couriersud2019-11-251-2/+13
| | | One folder less in the top-level.
* Clean up render_screen_list code, replacing simple_list with std::list (nw) AJR2019-11-242-2/+2
|
* -bgfx: Fixed Github issue #5961. [Ryan Holtz] MooglyGuy2019-11-241-2/+2
|
* Opengl: Apply line width provided by renderer. [Couriersud] couriersud2019-11-241-0/+1
|
* bgfx: Fix edge case around B/C/G settings. [Couriersud] couriersud2019-11-241-1/+2
| | | | | | If e.g. kidniki is started with default gamma (1.0), changing gamma with slider doesn't work. Setting to a gamma <> 1 and restarting MAME will apply the gamma. This commit fixes this.
* srcclean (nw) Vas Crabb2019-11-253-3/+3
|
* -bgfx: Fixed Github issues #5830 and #5956. [Ryan Holtz] MooglyGuy2019-11-2512-47/+119
|
* srcclean and indentation cleanup (nw) Vas Crabb2019-11-241-22/+22
|
* Opengl render driver: fix bug preventing adjustment of ... [Couriersud] couriersud2019-11-241-1/+1
| | | | | | | | | | | | gamma, brightness and contrast. Starting MAME with defaults, i.e. gamma == 1.0, no rgb palette will be allocated. If gamma than is changed, a new palette will be allocated. But the texture will not be updated because the palette is not checked. This fix will check for palette changes. Note: if the palette is changed inplace, i.e. without reallocation, this will fail. The correct fix would be that the texture palette is not only a pointer to rgb_t * but to texture_palette_type. texture_palette_type would hold the pointer, the length and a sequential id which is checked in addition to pointer equality.