summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdepend.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* osd: Cleaned up MIDI and network interfaces a little more. Vas Crabb2024-03-011-20/+5
|
* Update accumulating relative inputs exactly once per frame. Vas Crabb2023-02-241-1/+1
| | | | | | | | | | | | | This fixes "amplification" effects that would happen if the frame rate rose above 100 Hz (whether by unthrottling or otherwise). Synchronise with wall clock any time inputs are read. Not doing this has weird effects on relative inputs with frame skipping and contributes to unresponsiveness of menus. Reduce visual latency for mouse movement on menus when paused or skipping frames. The rest of the code changes to menus won't provide benefits until draw can happen after event handling.
* osd: Cleaner way of dealing with input updates. Vas Crabb2023-02-231-0/+1
|
* OSD/network interface cleanup AJR2022-08-281-1/+18
| | | | | | | - Move osd_midi_device from osdcore.h to osdepend.h - Move osd_list_network_adapters from osdcore.h to osdnet.h (was already defineduniquely in osdnet.cpp) - Move #include <cstdarg> from osdcore.h to emu.h - Remove dinetwork.h from emu.h
* Clean up #includes in src/osd (#10029) ajrhacker2022-07-041-3/+6
| | | | | * Clean up #includes in src/osd * render/bgfx/view.cpp: Add license header
* unicode.h: Updates AJR2020-12-151-1/+0
| | | | | - Remove from emu.h (except for UTF8_xxx macros, which have been transplanted to emucore.h since a lot of drivers use them) and osdepend.h - Add std::string_view overrides for uchar_from_utf8 and normalize_unicode
* Got rid of global_alloc/global_free. Vas Crabb2020-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* UI input menu: treat codes containing a postive and negative of the same ↵ Vas Crabb2019-11-211-1/+1
| | | | | | | | thing as invalid (e.g. A S not A) ioport.cpp: * better than 50% reduction in compile time, and better locality for static data * better encapsulation, const correctness and noexcept usage
* Remove up to one frame of input latency. (#5901) antonioginer2019-11-161-0/+1
| | | | | | | | | | * Remove up to one frame of input latency. Makes MAME virtually lagless on VRR monitors. * Use empty parentheses and clean interface member calls * Add new option -instant_blit to make this feature optional * Rename new option to -lowlatency, -ll
* (nw) Clean up the mess on master Vas Crabb2019-03-261-2/+3
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-3/+2
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* apply -verbose after processing command-line options and after first pass ↵ Vas Crabb2019-01-121-2/+3
| | | | over .ini files (nw)
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-2/+2
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* use standard types uintptr_t, char16_t and char32_t instead of FPTR, ↵ Miodrag Milanovic2016-10-221-1/+1
| | | | utf16_char, unicode_char (nw)
* ui refactoring [Vas Crabb] Vas Crabb2016-05-271-1/+1
| | | | | | | * move menu classes into ::ui namesapce * reduce scope of many symbols (first step in making UI code less rage-inducing so I can fix text input)
* Move slider_state and ui_menu_item into src/frontend/mame, nw therealmogminer@gmail.com2016-05-161-1/+1
|
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-1/+1
|
* Isolate CLI part (nw) Miodrag Milanovic2016-04-201-1/+0
|
* Add AVI writing to bgfx, nw therealmogminer@gmail.com2016-04-171-0/+1
|
* Make OSDs return ui_menu_item lists, not slider_state lists therealmogminer@gmail.com2016-04-101-3/+2
|
* Make sliders use an std::vector instead of a linked list, nw therealmogminer@gmail.com2016-04-101-1/+1
|
* Move font enumeration to OSD, separate font name from display name as needed ↵ Vas Crabb2016-03-171-7/+23
| | | | for OSX
* More work on targets, nw therealmogminer@gmail.com2016-02-211-1/+1
|
* First take on render API reorg, nw therealmogminer@gmail.com2016-02-211-1/+3
|
* Fix warning with some clang configurations, don't automatically disable bgfx ↵ Vas Crabb2015-04-031-0/+2
| | | | for 10.5 Leopard
* Converted midi into a module. (nw) couriersud2015-01-311-0/+3
|
* Cleanups and version bumpmame0158 Miodrag Milanovic2015-01-281-4/+4
|
* Added a generic module abstraction layer and migrated font modules to couriersud2015-01-231-9/+2
| | | use this layer. (nw)
* Moved font code into osd/modules/font. Extended osd_font to a proper couriersud2015-01-191-7/+22
| | | interface. (nw)
* Changed osd_font to struct osd_font and removed unnecessary osdepend.h couriersud2015-01-171-4/+4
| | | includes.
* OSD Updates: couriersud2015-01-141-7/+2
| | | | | - OSD can now use OPTION_COMMAND; added execute_command handler to osd_interface. - moved list_network_devices and list_midi_devices to OSD
* Untangled options inheritance. Previously code locked in osd_options couriersud2015-01-131-101/+1
| | | | | | | | | | | | | locking any potential future OSD to these. Options inheritance now is core_options emu_options cli_options osd_options [sdl|win]_osd_options This required a number of minor changes to other code as well. Tested on linux-sdl, windows-sdl, windows-mainline, osx-sdl
* Converted back osd_interface into a pure interface. couriersud2015-01-121-177/+80
| | | | | | | The previous version just exhibited any member of osd_interface to the core. This one limits core access to osd to those functions originally specified. There is room for improvement going forward here in the design. Left FIXMEs where appropriate. (nw)
* Moved osd midi stuff to osd/modules/midi. Needed to touch a couple of couriersud2015-01-091-0/+7
| | | | other files so that mame compiles and links. Tested SDL build (linux/windows).
* Added window to osd_interface (nw) Miodrag Milanovic2014-09-011-0/+2
| | | | win_monitor_info to class win_window_info to class, partial
* More cleanups, there is issue with srcclean that needs to be taken care as ↵ Miodrag Milanovic2014-07-221-23/+23
| | | | well, just doing now what we can
* -Reorganized OSD, handling more sound output systems and debuggers, defaults ↵ Miodrag Milanovic2014-05-081-11/+178
| | | | | | left same as before [Miodrag Milanovic] -Created osd_options as base option class for non-system specific options
* -Made osd_interface base class for OSD and moved initialization for each ↵ Miodrag Milanovic2014-04-251-0/+21
| | | | | | | | subsystem in it as virtual calls. (nw) -Moved midi handling in base class -Cleaned running_machine of information of next machine -All is cleaned after exiting of running_machine so debugger window is removed as well till next machine is started -Made osdmini to compile
* reverting to classic ui due to lot of issues, as much as I hate reverting ↵ Miodrag Milanovic2014-04-171-2/+0
| | | | some else code (nw)
* Small core cleanup (nw) Miodrag Milanovic2014-04-151-1/+0
|
* Merge of new menubar code Nathan Woods2014-04-121-0/+2
|
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-2/+2
|
* Major bitmap-related changes throughout the system. There are Aaron Giles2012-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | almost certainly some regressions lurking. Let me know if something seems busted. Bitmaps are now strongly typed based on format. bitmap_t still exists as an abstract base class, but it is almost never used. Instead, format-specific bitmap classes are provided: bitmap_ind8 == 8bpp indexed bitmap_ind16 == 16bpp indexed bitmap_ind32 == 32bpp indexed bitmap_ind64 == 64bpp indexed bitmap_rgb32 == 32bpp RGB bitmap_argb32 == 32bpp ARGB bitmap_yuy16 == 16bpp YUY For each format, a generic pix() method is provided which references pixels of the correct type. The old pix8/pix16/pix32/ pix64 methods still exist in the short term, but the only one available is the one that matches the bitmap's pixel size. Note also that the old RGB15 format bitmaps are no longer supported at all. Converted model1, megadriv, and stv drivers away from the RGB15 format bitmaps. New auto_bitmap_<type>_alloc() macros are provided for allocating the appropriate type of bitmap. Screen update functions now must specify the correct bitmap type as their input parameters. For static update functions the SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and SCREEN_UPDATE_IND16 macros. All existing drivers have been updated to use the correct macros. Screen update functions are now required for all screens; there is no longer any default behavior of copying a "default" bitmap to the screen (in fact the default bitmap has been deprecated). Use one of the following to specify your screen_update callback: MCFG_SCREEN_UPDATE_STATIC(name) - static functions MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members Because the target bitmap format can now be deduced from the screen update function itself, the MCFG_SCREEN_FORMAT macro is no longer necessary, and has been removed. If you specify a screen update callback that takes a bitmap_ind16, then the screen will be configured to use a 16bpp indexed bitmap, and if you specify a callback that takes a bitmap_rgb32, then a 32bpp RGB bitmap will be provided. Extended the bitmap classes to support wrapping a subregion of another bitmap, and cleaner allocation/resetting. The preferred use of bitmaps now is to define them directly in drivers/devices and use allocate() or wrap() to set them up, rather than allocating them via auto_bitmap_*_alloc(). Several common devices needed overhauls or changes as a result of the above changes: * Reorganized the laserdisc base driver and all the laserdisc drivers as modern C++ devices, cleaning the code up considerably. Merged ldsound device into the laserdsc device since modern devices are flexible enough to handle it. * Reorganized the v9938 device as a modern C++ device. Removed v9938mod.c in favor of template functions in v9938.c directly. * Added independent ind16 and rgb32 callbacks for TMS340x0 devices. * All video devices are now hard-coded to either ind16 or rgb32 bitmaps. The most notable is the mc6845 which is rgb32, and required changes to a number of consumers. * Added screen_update methods to most video devices so they can be directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating tons of stub functions.
* (Finally found the time to finish this....) Aaron Giles2011-05-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Low-level input upgrade. Classes now exist for input_codes, input_items, input_devices, and input_seqs. Also created an input_manager class to hold machine-global state and made it accessible via machine.input(). Expanded the device index range (0-255, up from 0-16), and the OSD can now specify the device index explicitly if they can better keep the indexes from varying run-to-run. [Aaron Giles] Note that I've built and run SDL on Windows, but not all the code paths were exercised. If you use mice/joysticks extensively double-check them to be sure it all still works as expected. This is mainly an OSD and core change. The only thing impacting drivers is if they query for specific keys for debugging. The following S&Rs took care of most of that: S: input_code_pressed( *)\(( *)([^, ]+) *, * R: \3\.input\(\)\.code_pressed\1\(\2 S: input_code_pressed_once( *)\(( *)([^, ]+) *, * R: \3\.input\(\)\.code_pressed_once\1\(\2
* Call off the dogs, the OSD routing for OSD-side sliders has been fixed. nwn Ryan Holtz2011-05-231-0/+3
|
* Cleanup & version bump.mame0140u1 Aaron Giles2010-11-081-3/+3
|
* Added support for OSD-generated fonts. The OSD is queried first to see Aaron Giles2010-10-241-0/+7
| | | | | | | | | | | | | | | | | if it owns a given font (based on the name), and if it does, it is responsible for generating bitmaps on the fly as characters are requested. Added new option -uifont to specify the UI font. It can be set to a filename, in which case a BDF font will be loaded. It can also be set to a font name (assuming the OSD support is present), in which case the OSD font by that name is used. The default value is 'default' which can be used by the OSD to substitute a default font or by the OSD, which will default to ui.bdf as before. In all cases, it falls back to the built-in font by default if none of the previous options works. On Windows, the OSD will default to Tahoma as the font name. Also on Windows, font names can be specified with [b] to indicate bold or [i] to indicate italic.
* Create new class osd_interface to house OSD callbacks. Added new Aaron Giles2010-10-211-128/+37
| | | | | | | | | module osdepend.c with default empty implementations. Changed mame_execute() and cli_execute() to accept a reference to an osd_interface which is provided by the caller. Updated SDL and Windows OSD to create an osd_interface-derived class and moved their OSD callbacks to be members.
* **FOR REVIEW** Andrew Gardner2010-09-201-0/+1
| | | | | | | | | | | | | | | | | Log: Added preliminary support for saving debugger window locations. [Andrew Gardner] (Notes) * I only save the values for the SDL debugger for now. * There is no loading of these values yet, but if this patch is confirmed good, loading should be relatively straightforward to add. * There is a slight chance this might not compile on OSes other than linux. I will be available via e-mail for the next 10 hours and will assist with any compilation problems if they occur. * The patch seems like the "right way" to do things, but if I am doing anything suspect, please feel free to make suggestions and corrections.