Commit Graph
136 Commits
Author SHA1 Message Date
AndywinXp aae1cac682 GUI: Only show the quit dialog in absence of an engine GUI override 2023-01-20 10:03:37 +01:00
Cameron Cawley cb3a024589 COMMON: Allow registering multiple event mappers 2022-06-18 23:13:17 +02:00
Thunderforge fd129ebc0c JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).

Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
2022-01-29 14:15:05 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Cameron Cawley dd1bf34f18 BACKENDS: Hide the virtual keyboard action when one isn't available 2021-11-01 16:54:39 +01:00
Cameron Cawley 6dbb129f40 BACKENDS: Allow activating the system virtual keyboard using the keymapper 2021-11-01 16:54:39 +01:00
sluicebox 386c5659ec BASE: Purge keyboard/mouse events before running Engine
Fixes GUI events leaking into engines at startup. This caused
Phantasmagoria 1 to skip its introduction if the game was started from
the ScummVM GUI with a keyboard (Enter) but not with a mouse because
the key-down event started the engine and the key-up event remained
in the queue.

This also purges and mouse events since we happen to already have a
purgeMouseEvents() method. We may want to also clear joystick inputs,
or possibly the entire event queue, but that can be done after the
upcoming release. For now, the known bug is fixed.
2021-08-23 15:46:33 -05:00
Thierry Crozat a1c807704d ALL: Ignore force RTL option when the engine does not support RTL
This fixes bug #12072: Cannot quit Blazing Dragons when always
return to launcher is selected
2021-01-20 23:35:47 +00:00
Thierry Crozat 9e5540f838 BASE: Handle RTL at exit config in scummvm_main
This config was handled in the DefaultEventManager, but this did not
work for engines that quit the game without using a QUIT_EVENT (such
as SCI). So now it is handled one level up directly in scummvm_main.

Note: It is still also handled in the DefaultEventManager so that we
get the correct confirmation dialog there when "confirm_exit" is true.
2020-12-09 22:13:22 +00:00
Thierry Crozat 5638fc84f3 GUI: Prevent the 'Confirm RTL' dialog from being invoked recursively
I reused the same flag that was already used for the same purpose
for the 'Confirm exit' dialog. This means that if we have both a
RTL and a Quit event in the queue, only the first one will have a
confirmation dialog. If this is an issue, we can instead introduce
a separate flag for the RTL dialog.
2020-12-04 22:43:03 +00:00
Lothar Serra Mari c027d3789d GUI: Cleanup confirm_exit code 2020-12-02 22:39:22 +00:00
Lothar Serra Mari 6325e751f2 GUI: Only show 'confirm_exit' dialog when running an engine 2020-12-02 22:39:22 +00:00
Lothar Serra Mari 6da9994da9 GUI: Change button label on 'return to launcher' confirmation 2020-12-02 22:39:22 +00:00
Lothar Serra Mari 80de351bd9 GUI: Reword 'exit' and 'return to launcher' confirmation messages 2020-12-02 22:39:22 +00:00
Lothar Serra Mari fbd2173f3a GUI: Clarify that leaving a game will lead to loss of unsaved data 2020-12-02 22:39:22 +00:00
Lothar Serra Mari 4ee02f869c GUI: Add GUI option to always return to the Launcher instead of quitting
ScummVM
2020-12-02 22:39:22 +00:00
antoniou79 637d845210 COMMON: DEBUGGER: Don't attach again at EVENT_DEBUGGER
If already active

Addresses bug https://bugs.scummvm.org/ticket/11964
2020-11-22 13:58:57 +02:00
Thierry Crozat 760815b3b8 BACKENDS: Do not define a Quit action if the NoQuit feature is enabled 2020-08-29 16:31:37 +01:00
mataniko 2f5eb14d4b JANITORIAL: Rename additional RTL references and comments 2020-05-12 10:36:38 +02:00
mataniko 321a02aff2 JANITORIAL: Rename shouldRTL, resetRTL and FORCE_RTL 2020-05-12 10:36:38 +02:00
mataniko 06242a712b JANITORIAL: Rename EVENT_RTL
Now that ScummVM is adding RTL support, the EVENT_RTL should be disambigious that it is for returning to launcher
2020-05-12 10:36:38 +02:00
Henrik "Henke37" Andersson 7676efd0d9 Backends: Use PauseToken for showing the vkeyboard 2020-05-11 01:35:03 +02:00
Henrik "Henke37" Andersson ce4cfdf5d2 BACKENDS: Use PauseToken 2020-05-10 23:39:31 +02:00
Thierry Crozat 8b0b9f11c6 OSYSTEM: Add kFeatureNoQuit to remove Quit buttons and replace Quit with RTL
Some platforms should not allow quitting ScummVM. For example the Apple's
HUG for iOS state that we should "Never quit an iOS applications
programmatically". Adding the kFeatureNoQuit allows those backend
that need it to remove the possibility to quit the application.
2020-04-26 16:19:37 +01:00
Bastien Bouclet 85e3fb38fb SDL: Change keyboard repeat to apply on unmapped events
The keyboard repeat event generator is used when building against SDL1.
Previously the repeat events would generate based on the event stream
produced by the keymapper which is not guaranteed to have matching up
and down events in the case the keymaps are changed while a key is
pressed.

Fixes #11417.
2020-04-12 11:11:00 +02:00
Bastien Bouclet 9cc2fee887 SDL: Enable joystick input by default
Game controller input is now enabled whenever a compatible device is
connected. The keymapper's keymaps are refreshed when a joystick is added
or removed.

Fixes #10366.
2020-03-16 18:41:27 +01:00
Bastien Bouclet 568d882e80 KEYMAPPER: Introduce a Virtual Mouse event source
The Virtual Mouse is meant to provide a way to control the mouse cursor
on system without a physical mouse. It provides keymapper actions that
are expected to be bound to game controller axes or buttons.
2020-03-09 20:00:31 +01:00
Cameron Cawley 1605b72ee8 BACKENDS: Add events for additional mouse buttons 2020-02-26 21:34:24 +01:00
Bastien Bouclet 22c75c644a EVENTS: Change DefaultEventManager to be the owner of the keymapper 2020-02-22 13:14:04 +02:00
Paul Gilbert 30d34fa63d ENGINES: Implement autosaving in the Engine base class 2020-02-16 15:44:28 -08:00
Paul Gilbert 818d9bab27 ENGINES: Change debugger trigger to Ctrl+Alt+D using keymapper 2020-02-16 13:07:19 +02:00
Paul Gilbert 98f9c4f254 ENGINES: Create a default debugger when needed if none is yet set 2020-02-16 13:07:19 +02:00
Paul Gilbert 7b721eaac1 ENGINES: Adding debugger to base Engine class 2020-02-16 13:07:19 +02:00
Bastien Bouclet 43184657e9 EVENTS: Disable ScummVM's source of keyboard repeat events by default
Backends can still (and do) generate such events. This works around an
issue with the keymapper where the "DOWN" event would be mapped to a
key, but the corresponding "UP" event would be mapped to another one due
to a keymap change. The keyboard repeat generation system would believe
the key to be still pressed and send a continuous stream of repeat
events.
Ideally the keymapper should be fixed to always generate matching event
pairs. However this source of an infinite stream of events still looks
like trouble waiting to happen to me. Hence disabling it by default.
2020-01-29 08:51:30 +01:00
Bastien Bouclet 7ecccd3b30 MOHAWK: RIVEN: Add default joystick action mappings 2020-01-29 08:51:29 +01:00
Bastien Bouclet 426867f4bc KEYMAPPER: Give human readable descriptions to the keymaps 2020-01-29 08:51:29 +01:00
Bastien Bouclet 32174c9067 KEYMAPPER: Actions can now be bound to joystick buttons 2020-01-29 08:51:29 +01:00
Bastien Bouclet be49fc4b9a SDL: Add a keymap for the graphics manager 2020-01-29 08:51:29 +01:00
Bastien Bouclet c131e8f5b9 EVENTS: Use the keymapper for some previously hard-coded key bindings 2020-01-29 08:51:29 +01:00
Bastien Bouclet 14663c4790 KEYMAPPER: Make the keymapper mandatory 2020-01-29 08:51:29 +01:00
Bastien Bouclet 511d138bbc KEYMAPPER: Move the remap dialog to an option dialog tab
The aim is to make it easy to discover, and possible to use without a
keyboard.
2020-01-26 23:09:08 +02:00
Bastien Bouclet 8dd2b7ca39 EVENTS: Expose the primary global keymap builder 2020-01-26 23:09:08 +02:00
Le Philousophe dc0bfbc724 COMMON: Fix button state desynchronization when warping mouse 2019-05-22 00:14:56 +02:00
Bastien Bouclet 6eb9a48bbd EVENTS: Delay initializing the virtual keyboard
The virtual keyboard requires the backend to be fully initialized
because it needs the display size.

Fixes #10338.
2017-11-28 05:49:45 +01:00
Bastien Bouclet bc5ac6440c EVENTS: Fix one ms error in repeat event generation time check 2017-11-19 20:07:51 +01:00
Bastien Bouclet 7d811d356e EVENTS: Allow disabling repeat event generation 2017-11-19 16:12:50 +01:00
Bastien Bouclet 7539a77eeb EVENTS: Move key repeat handling to its own method 2017-11-19 16:12:50 +01:00
Bastien Bouclet 8beb519c5e EVENTS: Rename synthetic to kbdRepeat 2017-11-19 16:12:50 +01:00
Colin Snover d1b77d4b68 BACKENDS: Fix missing mouse events when system cursor cannot be moved
Normally with SDL, a mouse motion event will be sent after the
system mouse cursor has been moved by a call to
SDL_WarpMouseInWindow, but if the system cursor cannot be moved
(e.g. because the window does not have mouse focus), games still
need to receive these mouse events so they can successfully update
the mouse position internally. Otherwise, games continue to think
the mouse is still in the original position and will continue to
try to perform whatever action is associated with that mouse
position.

Refs Trac#9689.
2017-10-15 13:24:21 -05:00
Johannes Schickel 121687d2ed BACKENDS: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00