Commit Graph

42 Commits

Author SHA1 Message Date
Dentomologist c3bdd05d2a TAS Input: Enable hotkeys and controller input when Input has focus
Enable emulator hotkeys and controller input (when that option is
enabled) when a TAS Input window has focus, as if it was the render
window instead.  This allows TASers to use frame advance and the like
without having to switch the focused window or disabling Hotkeys Require
Window Focus which also picks up keypresses while other apps are active.

Cursor updates are disabled when the TAS Input window has focus, as
otherwise the Wii IR widget (and anything else controlled by the mouse)
becomes unusable. The cursor continues to work normally when the render
window has focus.
2024-05-31 15:14:44 -07:00
mitaclaw 0df401b164 Core::IsRunning: Avoid Global System Accessor 2024-05-01 08:54:17 -07:00
Admiral H. Curtiss 95cba6be2b
Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
2024-01-15 08:05:30 +01:00
Dentomologist 43e69d3e6a DolphinQt: Remove unnecessary qOverloads
qOverload is used to disambiguate pointers to overloaded functions, but
most of the usages in the code base were with non-overloaded functions.
2023-11-04 14:14:14 -07:00
xujibbs b3902397cb
DolphinQt/TASInputWindow: Make 'Enable Controller Input' translatable. 2023-08-18 21:02:30 +02:00
Admiral H. Curtiss e2fb8fab2f
DolphinQt: Set window decorations for all top-level QWidgets. 2023-08-12 16:54:54 +02:00
Lioncash e4caace6bb Common/IniFile: Move interface into Common namespace
Gets this out of the global namespace and into the Common namespace
2023-04-13 10:19:28 -04:00
sowens99 cd79207853 DolphinQt: StickWidget and IRWidget check for changed x/y before signaling change 2023-04-06 01:54:20 -04:00
Pokechu22 3f6b931150 DolphinQt: Fix TAS widgets not updating with enable controller input
This regressed in 0300b44d23. Specifically, the sliders and the stick/IR widgets did not update, but the spin boxes did update.
2023-03-12 17:58:48 -07:00
JosJuice 4d34f86121 DolphinQt: Add MotionPlus support to TAS input
Will manually controlling both an accelerometer and a gyroscope at the
same time be reasonable to do? No idea. Was this easy to implement
thanks to the input override system? Yes.

Fixes https://bugs.dolphin-emu.org/issues/12443.
2023-03-10 19:36:17 +01:00
JosJuice 0300b44d23 DolphinQt: Rework TAS input threading, part 2 (analog inputs) 2023-03-08 17:49:03 +01:00
JosJuice 11e4d46927 DolphinQt: Remove unneeded out parameters in TASInputWindow
IIRC we needed this before the input override system was added.
2023-03-08 17:49:03 +01:00
JosJuice 3eac1fc284 DolphinQt: Rework TAS input threading, part 1 (buttons)
This gets rid of a blocking operation, improving performance and fixing
https://bugs.dolphin-emu.org/issues/12893.

This also makes us no longer directly access the state of certain UI
elements from the CPU thread, which probably wasn't thread-safe but
doesn't seem to have caused any observable issues so far.
2023-03-08 17:49:02 +01:00
Pokechu22 7abee1a97b DolphinQt: Fix typo in GBA TAS input window
This generated a warning on GCC about the operation being potentially undefined (-Wsequence-point). I'm not sure if that was actually the case, but either way it is a mistake.
2023-01-12 14:33:58 -08:00
JosJuice 494b041b34 DolphinQt: Add settings to GBA TAS input window
We should expose Enable Controller Input and the turbo settings for
GBA just like we do for GameCube controllers and Wii Remotes.
I just forgot about it when implementing the GBA TAS input window.
2022-12-24 11:30:25 +01:00
JosJuice 40571cf13c DolphinQt: Add GBA TAS input window
When emulated GBAs were added to Dolphin, it was possible to control them
using the GC TAS input window. (Z was mapped to Select.) Unaware of this,
I broke the functionality in b296248.

To make it possible to control emulated GBAs using TAS input again,
I'm adding a proper TAS input window for GBAs, with a real Select button
and no analog controls.
2022-11-21 19:16:30 +01:00
JosJuice b296248b49 DolphinQt: Use input override system for TAS input windows
This lets the TAS input code use a higher-level interface for
overriding inputs instead of having to fiddle with raw bits.
WiiTASInputWindow in particular was messy with how much
controller code it had to re-implement.
2022-10-03 22:04:09 +02:00
spycrab 004e8a80b2 Add support for building against Qt 6 2022-05-02 22:39:33 -07:00
Pokechu22 2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
Pokechu22 78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
sowens99 3bc9f66336 Inscribe StickWidget ellipse in square
Previously, it was not clear where the boundary of the StickWidget was when interacting outside of the circle. This aims to restore the gray square present in the Wx-era.
2021-09-20 13:18:13 -04:00
JosJuice 1a5e0c2084 DolphinQt: Reduce latency of TAS input's controller input passthrough
Fixes https://bugs.dolphin-emu.org/issues/12676.

Needs testing to see if this impacts performance when controller
inputs are changing.
2021-09-19 17:08:10 +02:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Léo Lam 82f1e6204d
Fix -Wsign-compare warnings 2020-11-21 02:08:09 +01:00
JosJuice 6670226a44 DolphinQt: Reset TAS input slider to default on right-click
This is a feature which existed in DolphinWX. Seems like it got
implemented in DolphinQt for IRWidget/StickWidget but not sliders.
2020-10-18 13:47:00 +02:00
JosJuice 1c4088e203 DolphinQt: Allow customizing TAS input turbo interval
As a side effect of 9c5c3c0, Dolphin's frame counter was changed
to run at 60/50 Hz even if the game is running at a lower framerate
such as 30 fps. Since the TAS input turbo button functionality
toggled the state of a button every other frame as reported by
the frame counter, this change made the turbo button functionality
not work with 30/25 fps games.

I believe it would be hard to change the frame counter back to
how it used to work without undermining the point of 9c5c3c0,
and I'm not sure if doing so would be desireable or not anyway,
so what I'm doing instead is letting the user determine how long
turbo button presses should last. This lets users avoid the 30/25
fps game problem while also granting additional flexibility.
Perhaps there is some game where it is useful to mash at a speed
which is slower than frame perfect.
2020-07-02 16:58:29 +02:00
Lioncash 19115c84dd DolphinQt: Use qOverload where applicable
Provides the same behvaior, but in a much more concise manner.
2020-04-28 16:54:19 +02:00
spycrab 25d5f0d9ef
Merge pull request #8633 from spycrab/tas_window_fixes
Qt/TAS: Improve TAS windows
2020-02-24 07:26:49 +01:00
spycrab 29c7c12016 Qt/TAS: Improve TAS windows
- Use the Dolphin Icon in TAS Windows
- Prevent deformation of the stick widget (#11988)
- Improve visual appearance
- Set a reasonable minimum size
2020-02-18 16:13:31 +01:00
Jordan Woyak 5af2081c75 Core/WiimoteEmu: Add functions to Nunchuk, Classic Controller, and MotionPlus extensions to get/set data without duplicate bithacks everywhere. 2020-02-17 15:57:58 -06:00
Lioncash b493bdb912 DolphinQt/TASCheckBox: Mark GetValue() as const
This doesn't actually modify the checkbox's state, so this can be marked
as a const-qualified member function.
2020-01-26 21:41:31 -05:00
spycrab 039b1baa3a Qt/TAS: Implement turbo mode 2019-03-31 05:27:34 +02:00
spycrab 4ad67f471c Qt/TAS: Improve layout 2019-03-26 01:18:11 +01:00
spycrab 04583b17da Qt/TAS: Fix issue #11620 2019-03-26 00:38:25 +01:00
Jordan Woyak 0d1fbe7bbc WiimoteEmu: Major renaming and cleanup. 2019-02-02 19:40:31 -06:00
Jordan Woyak 0b4329e077 Implement the rest of the wiimote input reports. 2019-02-02 19:40:30 -06:00
Jordan Woyak 84d32f6645 WiimoteEmu: Fix usage of ReportFeatures in TAS related code. 2019-02-02 19:39:29 -06:00
spycrab 8e5c3d5b4e
Merge pull request #7326 from spycrab/qt_tas_fancy
Qt/TAS: Enable antialiasing for Stick/IR widgets
2018-08-15 19:46:56 +02:00
spycrab 1c793503b1 Qt/TAS: Implement recentering feature 2018-08-13 23:34:25 +02:00
spycrab 55c608b482 Qt/TAS: Enable antialiasing for Stick/IR widgets 2018-08-13 15:05:30 +02:00
Rukai b94262ec33 Add 'Enable Controller Input' checkbox to TAS dialogs
When disabled only inputs from TAS dialog are used.
When enabled inputs from TAS dialog are used, except when a change in
input is detected from a real controller, in this case the TAS value is
replaced with the real controller value.
2018-07-07 22:55:42 +10:00
spycrab 13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00