summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/window.cpp
Commit message (Collapse)AuthorAgeFilesLines
* osd: Moved some windows-specific stuff into osd/windows/window.{h,cpp}. Vas Crabb2023-02-261-0/+2
|
* osd: Cleaner way of dealing with input updates. Vas Crabb2023-02-231-5/+0
|
* osd/windows/window.cpp: Allow BGFX to bounce cleanly when toggling ↵ Vas Crabb2023-02-021-0/+4
| | | | fullscreen on Windows with multiple output screens/windows.
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-011-154/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-47/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* bgfx: Save values of most sliders per-system. Vas Crabb2023-01-081-1/+2
|
* osd/windows/window.cpp: Fixed a crash when toggling fullscreen. [Ryan Holtz] ↵ MooglyGuy2022-12-161-1/+4
| | | | | (#10692) osd/windows/window.cpp: Check for a non-null renderer before issuing a draw request to the renderer. [Ryan Holtz]
* sdl/window: add error retval check for bgfx on fallback hap2022-03-251-1/+1
|
* Updated BGFX fixes; verified as working on Linux and Windows. (#9420) MooglyGuy2022-03-151-1/+2
| | | | | | | * -bgfx: Improved stability when encountering missing files, and improved multi-window stability. [Ryan Holtz] * -osd: Added video-init fallback functionality to other OSDs. [Ryan Holtz] * -bgfx: Fixed issues from the previous batch of changes. [Ryan Holtz] * -osdwindow: Remove no-longer-needed addition of post_create(). [Ryan Holtz]
* Revert "More BGFX stability improvements (missing files + multi-window) (#9410)" Vas Crabb2022-03-161-2/+1
| | | | This reverts commit f5b75b74393646d1dc082ec807279451dc481854.
* More BGFX stability improvements (missing files + multi-window) (#9410) MooglyGuy2022-03-141-1/+2
| | | | | * -bgfx: Improved stability when encountering missing files, and improved multi-window stability. [Ryan Holtz] * -osd: Added video-init fallback functionality to other OSDs. [Ryan Holtz]
* osd/modules/input/input_rawinput.cpp: Allow re-plugging mouse/keyboard. Vas Crabb2022-03-111-3/+15
|
* Correctly adjust window size based on the computed visible area for ↵ antonioginer2022-01-211-1/+19
| | | | different stretching cases. (#9140)
* emu/render.cpp: Improved scale factor selection. (#8961) antonioginer2022-01-061-1/+4
| | | Fixes aspect related issues, undesired overscan, etc. (GitHub #8209, GitHub #8387, MT08110)
* -frontend: Don't inappropriately truncate text in menu text boxes. Vas Crabb2021-11-081-2/+30
| | | | -osd/windows: Handle WM_UNICHAR.
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-261-36/+0
|
* Fix various typos in comments AJR2021-10-051-1/+1
|
* Correctly apply -keepaspect with -unevenstretchx/y. (#8209) antonioginer2021-07-021-7/+3
| | | | * Correctly apply -keepaspect with -unevenstretchx/y. Initialize window at the correct size when -intscalex/y is used. * Get correct window size upon maximizing/minimizing with integer scaling.
* -A few incremental UI code improvements: Vas Crabb2021-03-121-12/+21
| | | | | | | | | * Simplified message when toggling UI controls. * Show actual configured UI toggle key, not misleading hard-coded text. * Push window activated/deactivated events to UI manager. * Simplified SDL window event handling code - events are pretty precise. -Miscellaneous code cleanup.
* -osd/windows: Minimise full-screen windows on losing focus (#2997). Vas Crabb2021-01-211-8/+17
| | | | | | | | -osd/modules/osdwindow.cpp: Clean up window title formatting. * Show data type model in window title. * Moved window title formatting to a single place. -tools/chdman.cpp: Removed some unnecessary .c_str() calls.
* Attempt at fixing Windows build AJR2021-01-051-1/+1
|
* osdwindow.cpp: Centralize basic functions; de-virtualize various getters AJR2021-01-041-109/+42
|
* Fixed the build. Robbbert2020-12-181-1/+1
|
* Remove keepaspect and fullstretch members of osd_video_config AJR2020-12-161-6/+8
|
* -Lua cleanup and documentation migration checkpoint. Vas Crabb2020-12-161-2/+2
| | | | | | | | | | | | | | | | | | | | * Cleaned up some more of the Lua inteface. Mostly replacing methods with properties, some consistency fixes, a few renames, some more exposed functionality, and a couple of properties that have no business being set from scripts made read-only. * Moved a lot more Lua documentation out of source comments into the documentation, and expanded on it in the process. * Got more UI code out of the input manager. * Changed input sequence poller to a polymorphic class where you specify your intention upfront. * Changed the cheat plugin to use UI Clear to clear hotkey assignments and leave them unchanged if the user starts assignment but doesn't press any switches. * Ported AJR's fix for over-eager double-click recognition from SDL to Windows OSD. -goldnpkr.cpp: Cleaned up inputs, using standard keyout and payout types and key assignments.
* -Switch to building MAME as C++17. Vas Crabb2020-11-151-0/+2
| | | | | | | * Updated sol2 to 3.2.2 * Updated pugixml to 1.10 * Increased minimum clang version to 6 * Cleaned up some stuff that can use new features
* Miscellaneous cleanup: Vas Crabb2020-10-101-143/+144
| | | | | * osd/windows: Use steady clock for timing double-clicks. * emu/uiinput.cpp: Made the event type a scoped enum.
* osd/windows: Don't restrict borderless full-screen windows to monitor work ↵ Vas Crabb2020-09-121-20/+20
| | | | area (MT07745).
* -util/xmlfile: Escape attribute and element content. Vas Crabb2020-09-061-7/+8
| | | | | | | | | | | | | | | | | | | | 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.
* windows: reduce minimum window height (nw) hap2020-06-261-10/+11
|
* windows: more lenient with resizing very large views in windowed mode (nw) hap2020-06-251-9/+13
|
* document some error (nw) MetalliC2020-02-151-0/+1
|
* fixed some modernize-use-auto clang-tidy warnings (nw) (#6238) Oliver Stöneberg2020-01-301-3/+3
|
* fixed some clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-301-7/+7
| | | | | | | | | | | | | | | | * 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)
* fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-11/+11
| | | | | | | | | | | | | | * 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)
* Removed some dead static variables (nw) (#5458) npwoods2019-08-111-9/+1
|
* Creating an -attach_window command line parameter on Windows to attach to an ↵ npwoods2019-08-041-10/+105
| | | | | | | | | | | | | | existing window (#5381) * Creating an -attach_window command line parameter on Windows to attach to an existing window * Moved -attach_window option to Windows-specific code * Created an osd_set_aggressive_input_focus() function and exposed to LUA * Created a dummy implementation of osd_set_aggressive_input_focus() for SDL
* Merge pull request #5380 from npwoods/winwindow_has_focus_return_bool R. Belmont2019-07-221-3/+3
|\ | | | | Changed winwindow_has_focus() to return bool
| * Changed winwindow_has_focus() to return bool npwoods2019-07-221-3/+3
| |
* | Merge pull request #5379 from npwoods/draw_video_contents_take_bool R. Belmont2019-07-221-3/+3
|\ \ | | | | | | Changing win_window_info::draw_video_contents()'s update parameter to be bool
| * | Changing win_window_info::draw_video_contents()'s update parameter to be npwoods2019-07-221-3/+3
| |/ | | | | | | bool
* / Removing a stray (likely vestigial) variable from window.cpp (nw) npwoods2019-07-221-8/+0
|/
* Changed a number of comment declarations to read *.cpp instead of *.c npwoods2019-06-161-1/+1
|
* (nw) Clean up the mess on master Vas Crabb2019-03-261-5/+24
| | | | | | | | | | | | | 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-24/+5
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* misc fixes Vas Crabb2019-02-181-5/+24
| | | | | | | | | | testkeys: * Clean up and modernise code * Use std::endl to end lines for its implicit flush * Centre window (less likely to hide behind taskbar, etc.) osdwin: * Ensure new windows are positioned within the work area of a monitor
* srcclean and cleanup (nw) Vas Crabb2018-10-281-1/+1
|
* osdwindows: Fixed the BGFX not rendering across multiple windows. Internal ↵ mooglyguy2018-10-061-0/+1
| | | | UI is still glitchy. [Ryan Holtz]
* fix building for windows with qt debugger. [smf] smf-2017-12-261-1/+1
|
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significant change, so please pay attention. The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.