summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/input.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-2266/+0
|
* champbas.c driver needs cleanup, i'll continue on that if i can sort out MCU ↵ hap2015-10-261-1/+1
| | | | emulation for it (via hmcs40 instead simulation)
* windows rawinput: allow nameless input devices hap2015-10-261-4/+4
|
* Cleanups and version bumpmame0166 Miodrag Milanovic2015-09-301-7/+7
|
* added 'global_inputs' (disabled by default) to allow MAME to read inputs ↵ David Haywood2015-09-141-6/+31
| | | | | | | | even when it doesn't have the focus [Scrooge McClunk] SailorSat made it possible to run multiple instances of MAME for link games, but the problem is that you can only control one MAME instance at a time (the window that has focus). Because win32 MAME supports RawInput, we can make linked games playable with global inputs that will poll simultaneously regardless of whether that MAME instance has focus. In win32 MAME using RawInput, keyboards were already registered for global inputs (RIDEV_INPUTSINK), but the polling code checks if the window has focus, so it wasn't taking advantage of it. I thought it'd be a good idea to add an option for global inputs to win32 MAME with RawInput. The WINOPTION is the "global_inputs" boolean. The option is disabled by default because this is an uncommon use case for MAME. The option is also disabled when forcing direct input and debugging. If the RawInput initialization code fails for whatever reason, the option will not be enabled. If the option is disabled, keyboards are no longer registered for global inputs (dwFlags set to 0 instead of RIDEV_INPUTSINK), because they won't work globally with the screen focus check anyway.
* Fixed GetModuleHandle to be universal. Vladimir Kryvian2015-08-251-4/+6
|
* fix compile on MSVC (nw) Peter Ferrie2015-06-171-1/+1
|
* Hook up -uimodekey for Windows Vas Crabb2015-06-151-146/+170
|
* Move UI mode key out of SDL options into generic options Vas Crabb2015-06-151-0/+20
|
* Identified window properties/variables which are used by renderers. couriersud2015-02-091-2/+2
| | | | Althought the code in window.h is far from nice currently it now allows to address one issue after the other. (nw)
* Fix crash on fatalerror from winwindow_video_window_create() Ramiro Polla2014-12-151-5/+8
|
* Added window to osd_interface (nw) Miodrag Milanovic2014-09-011-7/+7
| | | | win_monitor_info to class win_window_info to class, partial
* -Made osd_interface base class for OSD and moved initialization for each ↵ Miodrag Milanovic2014-04-251-20/+11
| | | | | | | | 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-37/+1
| | | | some else code (nw)
* ScrLock no longer is a menu key; it will now enable/disable keyboard menu ↵ Nathan Woods2014-04-161-1/+1
| | | | shortcuts
* Moved eminline and related files into /src/osd since it's system related (nw) Miodrag Milanovic2014-04-161-6/+6
| | | | | | | | Moved delegates into /src/lib/util to enable usage of delegates in other project parts Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* Changed mess.mak to display compilation of ymmu100.ppm nicely
* Merge of new menubar code Nathan Woods2014-04-121-2/+38
|
* a few adjustments for Visual Studio analysis (nw) Oliver Stöneberg2014-04-041-2/+2
|
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Aaron Giles] * these classes now no longer take a resource_pool; everything is managed globally -- this means that objects added to lists must be allocated with global_alloc * added new auto_pointer<> template which wraps a pointer and auto-frees it upon destruction; it also defaults to NULL so it doesn't need to be explicitly initialized * moved tagged_list template to tagmap.h Redo of the low-level memory tracking system: [Aaron Giles] * moved low-level tracking out of emu\emualloc into lib\util\corealloc so it can be shared among all components and used by core libraries * global_alloc and friends no longer use a resource pool to track allocations; turns out this was a wholly redundant system that wasted a lot of memory * removed global_resource_pool entirely * added global_free_array to delete arrays allocated with global_alloc_array * added tracking of object versus array allocation; we will now error if you use global_free on an array, or global_free_array on an object Added new utility helper const_string_pool which can be used to efficiently accumulate strings that are not intended to be modified. Used by updated makelist and software list code. [Aaron Giles] Updated png2bdc and makelist tools to not leak memory and use more modern techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles] Deprecated auto_strdup and removed all uses by way of caller-managed astrings and the software list rewrite. [Aaron Giles] Rewrote software list management: [Aaron Giles] * removed the notion of a software_list that is separate from a software_list_device; they are one and the same now * moved several functions into device_image_interface since they really didn't belong in the core software list class * lots of simplification as a result of the above changes Additional notes (no whatsnew): Moved definition of FPTR to osdcomm.h. Some changes happened in the OSD code to fix issues, especially regarding freeing arrays. SDL folks may need to fix up some of these. The following devices still are using tokens and should be modernized (I found them because they kept their token as void * and tried to delete it, which you can't): namco_52xx_device (mame/audio/namco52.c) namco_54xx_device (mame/audio/namco54.c) namco_06xx_device (mame/machine/namco06.c) namco_50xx_device (mame/machine/namco50.c) namco_51xx_device (mame/machine/namco51.c) namco_53xx_device (mame/machine/namco53.c) voodoo_device (emu/video/voodoo.c) mos6581_device (emu/sound/mos6581.c) aica_device (emu/sound/aica.c) scsp_device (emu/sound/scsp.c) dmadac_sound_device (emu/sound/dmadac.c) s3c2440_device (emu/machine/s3c2440.c) wd1770_device (emu/machine/wd17xx.c) latch8_device (emu/machine/latch8.c) duart68681_device (emu/machine/68681.c) s3c2400_device (emu/machine/s3c2400.c) s3c2410_device (emu/machine/s3c2410.c) strataflash_device (mess/machine/strata.c) hd63450_device (mess/machine/hd63450.c) tap_990_device (mess/machine/ti99/990_tap.c) omti8621_device (mess/machine/omti8621.c) vdt911_device (mess/video/911_vdt.c) apollo_graphics_15i (mess/video/apollo.c) asr733_device (mess/video/733_asr.c)
* Adopted 'bool' type Nathan Woods2014-02-051-15/+15
|
* Moved src/emu/ui.? ==> src/emu/ui/ui.?, changed to follow MAME OOP ↵ Nathan Woods2014-01-291-1/+1
| | | | conventions; we now have a ui_manager class
* basically an update to r26433 Michaël Banaan Ananas2013-12-141-7/+19
| | | | | | - moved all windows-only input "NOT" rules to osd/windows - changed windows fullscreen video from alt-f11 to shift-alt-f12 - added windows fullscreen toggle ralt-enter (heh, i didn't know that ((A AND B) OR (A AND C)) rules were possible)
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-35/+2
| | | | to new license tagged form.
* "put HLSL back ..." fix build etc. David Haywood2013-06-061-0/+18
|
* As this project is clearly now run by people who care more about "feelings" ↵ Ryan Holtz2013-06-061-18/+0
| | | | | and playing patty-cake with one another rather than actual results, consider this my resignation letter. Anyone who wants to know where HLSL went, feel free to ask Tafoid why he couldn't take a simple joke.
* Cleanups and version bumpmame0148u2 Miodrag Milanovic2013-03-191-3/+3
|
* input: Support up to 32 buttons and harmonize Windows and SDL behavior if ↵ R. Belmont2013-02-181-1/+11
| | | | you exceed the limit [Nick3092]
* Fix HLSL toggle and move it to Ctrl+Alt+F5. Next time someone touches the ↵ Ryan Holtz2013-01-281-1/+1
| | | | HLSL code without knowing what they're doing, I remove it entirely. (nw)
* - d3dhlsl.c: Made HLSL switchable at runtime, Ctrl+Alt+F12. [MooglyGuy] Ryan Holtz2013-01-131-1/+7
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-176/+176
|
* First pass at modernizing struct definitions. Aaron Giles2012-09-151-10/+5
|
* Clean-ups and version bumpmame0145u8 Miodrag Milanovic2012-05-071-1/+1
|
* ioport.c C++ conversion. Mostly internal changes, with no Aaron Giles2012-05-031-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intended differences from previous behavior. For drivers, the main change is that input_port_read() no longer exists. Instead, the port must be fetched from the appropriate device, and then read() is called. For member functions, this is actually simpler/cleaner: value = ioport("tag")->read() For legacy functions which have a driver_data state, it goes: value = state->ioport("tag")->read() For other legacy functions, they need to fetch the root device: value = machine.root_device().ioport("tag")->read() The other big change for drivers is that IPT_VBLANK is gone. Instead, it has been replaced by a device line callback on the screen device. There's a new macro PORT_VBLANK("tag") which automatically points things to the right spot. Here's a set of imperfect search & replace strings to convert the input_port_read calls and fix up IPT_VBLANK: input_port_read( *\( *)(machine\(\)) *, *([^)]+ *\)) ioport\1\3->read\(\) input_port_read( *\( *)(.*machine[()]*) *, *([^)]+ *\)) \2\.root_device\(\)\.ioport\1\3->read\(\) (state = .*driver_data[^}]+)space->machine\(\)\.root_device\(\)\. \1state-> (state = .*driver_data[^}]+)device->machine\(\)\.root_device\(\)\. \1state-> input_port_read_safe( *\( *)(machine\(\)) *, *([^,]+), *([^)]+\)) ioport\1\3->read_safe\(\4\) IPT_VBLANK( *\)) IPT_CUSTOM\1 PORT_VBLANK("screen")
* Change DirectInput joystick acquisition method to be non exclusive. [bdam] Michaël Banaan Ananas2012-03-251-2/+2
|
* DI_PROPNOEFFECT after dinput property change is not an error Michaël Banaan Ananas2011-08-011-4/+4
|
* - Removing MD5 support in ROMLOAD_* [Oliver Stoneberg] Miodrag Milanovic2011-07-311-1/+1
| | | | - Various core and tools memory leaks fixes [Oliver Stoneberg]
* HLSL Updates: [Ryan Holtz, Bat Country Entertainment, austere, SoltanGris42] Ryan Holtz2011-05-301-0/+14
| | | | | | | - Added the ability to render screenshots at arbitrary resolutions. - Added the ability to record AVI videos (albeit with no audio) at arbitrary resolutions. - Added a 43-tap-wide FIR-based NTSC filter with tunable Y, I and Q frequency response. - Updated scanlines to have a user-tunable pixel-height ratio in addition to the current screen-height ratio. - Fixed a VRAM leak that was causing many dynamic-resolution drivers to run out of memory mid-run.
* Should fix osd keys. Aaron Giles2011-05-301-2/+2
|
* (Finally found the time to finish this....) Aaron Giles2011-05-301-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Switch to using delegates for some callbacks: Aaron Giles2011-04-271-6/+6
| | | | | | | | | | | | - non-device timer callbacks - machine state changing callbacks - configuration callbacks - per-screen VBLANK callbacks - DRC backend callbacks For the timer case only, I added wrappers for the old-style functions. Over time, drivers should switch to device timers instead, reducing the number of timers that are directly allocated through the scheduler.
* Privatized most of the m_machine pointers in the system to prevent Aaron Giles2011-04-191-6/+10
| | | | direct use.
* BIG update. Aaron Giles2011-03-291-38/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *)
* Mapped KEYCODE_BACKSLASH2 to the OEM_102 key (located between LShift and Z ↵ Curt Coder2011-03-101-0/+1
| | | | on international keyboard layouts). [Curt Coder]
* Converted core_options to a class. Removed a bunch of marginal Aaron Giles2011-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality in favor of alternate mechanisms. Errors are now reported via an astring rather than via callbacks. Every option must now specify a type (command, integer, float, string, boolean, etc). Command behavior has changed so that only one command is permitted. [Aaron Giles] Changed fileio system to accept just a raw searchpath instead of an options/option name combination. [Aaron Giles] Created emu_options class dervied from core_options which wraps core emulator options. Added mechanisms to cleanly change the system name and add/remove system-specific options, versus the old way using callbacks. Also added read accessors for all the options, to ensure consistency in how parameters are handled. Changed most core systems to access emu_options instead of core_options. Also changed machine->options() to return emu_options. [Aaron Giles] Created cli_options class derived from emu_options which adds the command-line specific options. Updated clifront code to leverage the new class and the new core behaviors. cli_execute() now accepts a cli_options object when called. [Aaron Giles] Updated both SDL and Windows to have their own options classes, derived from cli_options, which add the OSD-specific options on top of everything else. Added accessors for all the options so that queries are strongly typed and simplified. [Aaron Giles] Out of whatsnew: I've surely screwed up some stuff, though I have smoke tested a bunch of things. Let me know if you hit anything odd. Also I know this change will impact the WINUI stuff, please let me know if there are issues. All the functionality necessary should still be present. If it's not obvious, please talk to me before adding stuff to the core_options class.
* mame_file is now emu_file and is a class. It is required Aaron Giles2011-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | to pass a core_options object to the constructor, along with a search path. This required pushing either a running_machine or a core_options through some code that wasn't previously ready to handle it. emu_files can be reused over multiple open/close sessions, and a lot of core code cleaned up nicely as things were converted to them. Also created a file_enumerator class for iterating over files in a searchpath. This replaces the old mame_openpath functions. Changed machine->options() to return a reference. Removed public nvram_open() and fixed jchan/kaneko16 to stop directly saving NVRAM. Removed most of the mame_options() calls; this will soon go away entirely, so don't add any more. Added core_options to device_validity_check() so they can be used to validate things.
* (typofix) Michaël Banaan Ananas2011-02-091-1/+1
|
* - Cleanup of WINUI depending compiling (no whatsnew) Miodrag Milanovic2011-02-041-1/+4
| | | | | - Rewritten some checks to be runtime instead of compile dependent - Added winmenu.c and "menu" option in windows build - winmenu.c provide just dummy implementation, and makes linking with actual menu implementation easier.
* Cleaned OSD windows and emu part from NEWUI dependencies (no whatsnew) Miodrag Milanovic2011-01-131-15/+0
|
* Moved image devices implementation and related UI functions to emu section ↵ Miodrag Milanovic2011-01-051-6/+0
| | | | from MESS [Miodrag Milanovic]
* Create new class osd_interface to house OSD callbacks. Added new Aaron Giles2010-10-211-2/+2
| | | | | | | | | 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.