summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/windows.lua
Commit message (Collapse)AuthorAgeFilesLines
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-011-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* osd: Cleaned up Windows API usage a little. Vas Crabb2022-05-261-2/+3
| | | | | | | | | * 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.
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-261-1/+0
|
* 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
|
* 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
|
* Removed winpcap and cleaned up network module selection. Vas Crabb2020-03-051-1/+0
| | | | | | | | (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.
* (nw) Clean up the mess on master Vas Crabb2019-03-261-0/+1
| | | | | | | | | | | | | 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-1/+0
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* further quieting of MS-LLVM (nw) Peter Ferrie2019-02-251-0/+1
|
* Attempted to sanitize/rationalize how we access UTF-8 command line arguments ↵ npwoods2017-09-181-3/+0
| | | | | | | | | | | (#2532) Specifically, this creates a call osd_get_command_line() that returns UTF-8 command line arguments as std::vector<std::string>. On non-Windows platforms, this does nothing more than build the vector. On Windows, this invokes GetCommandLineW() and CommandLineToArgvW(). This also attempts to unwind usage of wmain()/_tmain() on Windows, which is not standard. Related to this, this fixes a bug in Imgtool; specifically, non-7 bit ASCII was not being handled correctly in Windows. This is really an admission that the way that Windows handles Unicode and command line arguments sucks, and it is my belief that having a wmain() or _tmain() declaration specific for Windows is a worse solution. C'est la vie. I'm very open to the idea that src/osd/osdcore.[cpp|h] is not the best place to do this. Let me know if I should move it.
* In the windows debugger log window add a Log/Clear menu to remove all logged ↵ yz70s2017-07-301-0/+2
| | | | messages (nw)
* Add Lua-cleaning ability to srcclean Vas Crabb2016-08-301-1/+1
|
* POSIX implementation for new directory read features, cleanup of Windows ↵ Vas Crabb2016-06-251-1/+1
| | | | implementation, return directory handle as smart pointer, fix full build [Vas Crabb]
* Introduce dynamic_module Giuseppe Gorgoglione2016-06-111-2/+0
| | | | | This is a central cross-platform facility to dynamically bind functions from shared libraries. Updated all OSD modules to use it.
* Placed back old output system as module "-output windows" need more things ↵ Miodrag Milanovic2016-06-051-0/+32
| | | | cleaned (nw)
* moved osdsync to root of OSD, removed osdmini (nw) Miodrag Milanovic2016-04-151-3/+2
|
* Remove os dependant output handling (nw) Miodrag Milanovic2016-04-091-33/+0
|
* move clipboard handling on proper place (nw) Miodrag Milanovic2016-04-031-1/+0
|
* scrclean on lua scripts (nw) Miodrag Milanovic2016-03-291-3/+3
|
* Make osd_file a polymorphic class that's held with smart pointers Vas Crabb2016-03-141-4/+6
| | | | | | | | | | | | | | | Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures Make zip_file and _7z_file classes rather than having free functions everywhere Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache Don't dump as much crap in global namespace Add solaris PTY implementation Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax Rearrange stuff so the same things are in file module for all OSDs Move file stuff into its own module 7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access Directory functions still need to be moved to file module SDL OSD may not initialise WinSock on Windows
* Clang 3.8.0 supports -municode (nw) Miodrag Milanovic2016-03-141-1/+1
|
* Fixing issue compiling on GCC 4.9 till 5.1 (nw) Miodrag Milanovic2016-03-051-0/+1
|
* link ole32 on Windows. Needed for CoInitializeEx() Brad Hughes2016-03-021-0/+1
|
* Used std::thread and std::condition_variable (nw) Miodrag Milanovic2016-03-011-12/+2
|
* Dynamically load xinput Brad Hughes2016-03-011-1/+0
|
* Add XInput support for Windows OSD Brad Hughes2016-02-291-0/+1
|
* cleanup (nw) Miodrag Milanovic2016-02-291-1/+0
|
* Merge input modules work. Brad Hughes2016-02-281-1/+0
|\
| * Refactor OSD input into modules Brad Hughes2016-02-281-1/+0
| |
* | First take on render API reorg, nw therealmogminer@gmail.com2016-02-211-3/+6
| |
* | removed old entries. nw dankan18902016-02-171-1/+0
|/
* qtdebugger as separate lib (nw) Miodrag Milanovic2015-12-261-0/+16
|
* Can't do override checks due to QT headers (nw) Miodrag Milanovic2015-12-071-6/+0
|
* Added addprojectflags function and added -Wsuggest-override for all that are ↵ Miodrag Milanovic2015-12-061-0/+6
| | | | | | not 3rdparty projects. It is place where all additional checks we should put
* Added info header at the top of each .lua file (nw) Scott Stone2015-11-141-0/+8
|
* added more h files missing in lua scripts (nw) Miodrag Milanovic2015-11-121-0/+38
|
* Remove not longer needed ForceCpp flag (nw) Miodrag Milanovic2015-11-081-7/+0
|
* update build scripts for rename c - > cpp (nw) Miodrag Milanovic2015-11-081-41/+41
|
* update build scripts and code change in order to fix compile (nw) Miodrag Milanovic2015-09-131-0/+1
|
* Update scripts for compile with latest BGFX (nw) Miodrag Milanovic2015-09-121-0/+1
|
* Fixed VS build (nw) Miodrag Milanovic2015-08-011-1/+3
|
* hmm.. new 5.2 mingw seems to need this to pickup sprintf for lto (NW) Cowering2015-07-231-0/+1
|
* Allow compiling with shared libraries [O. Galibert] Olivier Galibert2015-05-311-2/+2
| | | | | | | | | | Put SHLIB=1 in the main makefile, or on the command line. The idea is to get a *way* faster link with symbols. It works at least on linux, with one annoying caveat: you have to be in the build/projects/sdl/mame/gmake-linux directory to start mame afterwards. We're going to move some things around to be able to use LD_LIBRARY_PATH or have it start as-is from the root.
* propagate _subtarget in maintargetosdoptions call (nw) Miodrag Milanovic2015-05-211-1/+1
|
* Removed comments and added generic license for whole team on top (nw) Miodrag Milanovic2015-05-091-0/+3
|
* fix for few more executable files (nw) Miodrag Milanovic2015-04-161-0/+4
|