summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/window.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Initial touch input support: Vas Crabb8 days1-49/+516
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feed mouse/pen/touch pointer events through UI input manager with Win32 and SDL. * Started migrating UI code to use new API and reworking mouse/touch interaction. * emu/render.cpp: Support pressing multiple clickable layout items simultaneously. * emu/render.cpp: Allow UI elements to be drawn in any window. * emu/rendlay.cpp, luaengine_render.cpp: Added layout view events for pointer input. * ui/ui.cpp: Allow the UI handler to control pointer display. * ui/analogipt.cpp: Added mouse/touch and more keys for navigating field state list. * ui/menu.cpp: Use vertical swipe to scroll and horizontal swipe to adjust. * ui/menu.cpp: Draw after processing input - greatly improves responsiveness. * ui/menu.cpp: Ignore keyboard/gamepad input during pointer actions. * ui/selmenu.cpp: Made left/right info pane arrows repeat when held. * ui/selmenu.cpp: Use middle click to move keyboard focus. * ui/selmenu.cpp: Let filter list scroll if it's too tall, and use a bit of horizontal padding. * ui/selmenu.cpp: Improved divider sizing. * ui/state.cpp: Don't allow clicks to pass through the confirm deletion prompt to the menu. * ui/simpleselgame.cpp: Fixed error message display and graphics/sound status not showing. * ui/simpleselgame.cpp: Allow tap/click to dismiss error message. * ui/utils.cpp: Show UI for choice filters when there are no choices - it's less confusing. * modules/input/input_sdl.cpp: Made scaling for mouse scroll better match RawInput and DirectInput. * modules/input/input_rawinput.cpp: Added support for horizontal scroll axis. * modules/input/input_win32.cpp: Added support for scroll axes and more buttons to mouse/lightgun. * modules/debugger/debugimgui.cpp: Don't fight over events with the UI manager - it breaks menus. * osd/windows/window.cpp: Translate mouse position to window cooridinates for scroll wheel events. * osd/sdl/window.cpp: Supply last mouse position for scroll wheel events if possible. * scripts/build/complay.py: Made zero input mask an error - it was only being used to block clicks.
* osd/modules/input: Various cleanup and minor enhancements. Vas Crabb2024-03-041-3/+3
| | | | | | | | | | | | | | | | | | | input_common.h: Got rid of the DirectInput key code macros. DirectInput headers are always available on Windows - it's just an opportunity for bygs. input_common.cpp: Added default names for keys mapped to MAME's "other switch" type. input_rawinput.cpp: Simulate Pause key being held for 30ms, similarly to what's done for Caps Lock on macOS with SDL. Also added a gross hack to give "correct" names for Pause and Num Lock. input_sdl.cpp: Get default key names from SDL. Not really that useful as it isn't aware of the current keyboard layout. Key map files are still needed for anything other than a US ANSI layout. Also added some comments.
* 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]