Commit Graph

47 Commits

Author SHA1 Message Date
luc-git
d124fcbb0d
DolphinQt/RenderWidget: Add comments for SetCursorLocked() on Linux.
Co-authored-by: Admiral H. Curtiss <pikachu025@gmail.com>
2024-01-30 01:06:30 +01:00
TellowKrinkle
fc53dca7bd Qt: Send SizeChanged on DPI changes 2023-06-11 20:05:27 -05:00
Michael Cook (mackal)
241a739dc2 DolphinQt: RenderWidget fix heap-use-after-free
The QByteArray returned by QString::toUtf8() was being freed so the char
pointer was pointing to freed memory.

Found via ASan, didn't notice any issues during normal runtime.

This was triggered after hitting a key combo with alt (ex. toggle
fullscreen) probably happens with others
2023-04-03 10:43:49 -04:00
Scott Mansell
9c1fe59cc9 Insert a more solid abstraction between Qt and Imgui 2023-02-09 18:36:20 +13:00
Scott Mansell
0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00
Pokechu22
e37aa3ed90
RenderWidget: Fix random crash due to missing ImGui context
`ImGui::GetIO` performs an assertion that a context exists, and if one doesn't then things will likely crash.  Unfortunately this crash is hard to consistently reproduce.
2022-11-06 21:41:07 +01:00
Jordan Woyak
4fc05dd025 DolphinQt: Fix window focus from unpausing after a manual pause. 2022-10-25 19:39:41 -05:00
Admiral H. Curtiss
b10808d815
Merge pull request #8763 from JosJuice/panic-alert-deadlock-gpu
DolphinQt: Fix the panic alert deadlock, dual core edition
2022-05-16 02:21:14 +02:00
spycrab
004e8a80b2 Add support for building against Qt 6 2022-05-02 22:39:33 -07:00
JosJuice
3367e5e026 DolphinQt: Fix the panic alert deadlock, GPU thread edition
The fix in ef77872 worked for panic alerts from
the CPU thread, but there were still problems with
panic alerts from the GPU thread in dual core mode.
This change attempts to fix those.
2022-01-13 22:19:54 +01:00
Rafaël Kooi
b756dc40bb RenderWidget: Add include to Windows.h
Fixes errors when building with CMake. PCH support is currently broken,
however the code shouldn't have a hard dependency on PCH anyway.
2022-01-01 17:58:20 +01:00
Admiral H. Curtiss
d6331c1e71
Config: Port remaining Interface settings to new config system. 2021-12-31 17:40:04 +01:00
Admiral H. Curtiss
9c4b2b65b4
Config: Port Input setting to new config system. 2021-12-30 21:50:36 +01:00
Pokechu22
ef80d51df1 RenderWidget: Change "imgui.h" to <imgui.h>
This was originally intended to fix https://bugs.dolphin-emu.org/issues/12717 but this ended up not being the issue (instead it seems like files just weren't recompiled when imgui was updated due to MSVC weirdness).  Still, using brackets instead of quotes is preferable as this is a library include.
2021-10-29 12:05:21 -07:00
sowens99
2aa400e72f Add option for Never Hide Mouse Cursor
Instead of having a single GUI checkbox for "Always Hide Mouse Cursor",
I have instead opted to use radio buttons so the user can swap between
different states of mouse visibility. "Movement" is the default
behavior, "Never" will hide the mouse cursor the entire time the game is
running, and "Always" will keep the mouse cursor always visible.
2021-10-12 21:04:27 -04:00
sowens99
5145853351 Bug: fix unhide on mouse movement only responding to clicks
Previously the unhide of movement mouse_timer reset occurred within case MouseButtonPress.

Additionally, there was a redundant expression in the if statement for cursor locking.
2021-10-12 20:59:31 -04:00
Fletcher Porter
0a7eed71f3 Fix switch warning in RenderWidget
The compiler was throwing a bunch of `-Wswitch` warnings from RenderWidget
because of unhandled branches, so I added a default branch to quiet it.
2021-10-11 17:18:32 -07: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
Filoppi
3c7c2dfaa1 Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
iwubcode
679d51c289 RenderWidget: Remove mouse based Free Look since it has moved to the HotkeyScheduler 2021-03-17 20:58:33 -05:00
iwubcode
b9d9b27a81 DolphinQt: Only trigger Free Look mouse movement when the Free Look camera is active 2020-12-24 13:49:25 -06:00
Léo Lam
6018525992
Qt: Fix deprecated use of MidButton
MidButton has been deprecated since Qt 4.7. The replacement is
MiddleButton.
2020-12-16 14:45:11 +01:00
JMC47
e0117a86ad
Merge pull request #8819 from JosJuice/panic-alert-deadlock-pause-on-focus-loss
DolphinQt: Fix the panic alert deadlock, Pause on Focus Loss edition
2020-09-15 11:46:46 -04:00
Filip Gawin
0ede5d1537 Use range loop (if possible) 2020-07-18 18:29:16 -05:00
JosJuice
cc330afa6b DolphinQt: Fix the panic alert deadlock, Pause on Focus Loss edition
why are there so many ways to trigger this issue
2020-05-18 19:38:56 +02:00
iwubcode
e125c61d47 VideoCommon: remove VertexShaderManager functions instead preferring the direct freelook camera methods 2020-05-03 13:34:13 -05:00
Stenzek
cdb0aa850d Qt/RenderWidget: Remove fill background functionality
We no longer need this since the video backend handles clearing the
window, and it fixes MoltenVK with Qt 5.14.
2020-03-11 23:13:45 +10:00
Connor McLaughlin
a0b7c1beae
Merge pull request #8366 from Techjar/high-dpi-auto-adjust
Qt/RenderWidget: Account for devicePixelRatio when auto-adjusting window size
2020-01-24 11:31:09 +10:00
Techjar
3006c73bf6 Qt/RenderWidget: Account for devicePixelRatio when auto-adjusting window size 2019-11-01 14:37:29 -04:00
ferrrry
ae337dbea9 Qt: Add "renderer" window role to render window 2019-10-25 22:51:05 +01:00
spycrab
ec526fee56 Externals/Qt: Update to 5.13.1 2019-10-13 16:06:56 +02:00
Lioncash
a9663669dc Common/CommonFuncs: Remove now-unneccessary ArraySize function
Since C++17, non-member std::size() is present in the standard library
which also operates on regular C arrays. Given that, we can just replace
usages of ArraySize with that where applicable.

In many cases, we can just change the actual C array ArraySize() was
called on into a std::array and just use its .size() member function
instead.

In some other cases, we can collapse the loops they were used in, into a
ranged-for loop, eliminating the need for en explicit bounds query.
2019-06-01 10:07:57 -04:00
Léo Lam
6f84984b7b Use attribute [[fallthrough]] 2019-05-04 23:04:18 +02:00
Pokechu22
0cb27cc42c Fix the screen going black on pause after changing windows
More info: https://zeduckmaster.frama.io/2016/how-to-create-a-custom-rendering-in-a-qt5-widget/
2019-04-27 23:26:44 -07:00
JMC47
6ea43235d5
Merge pull request #7841 from iwubcode/config-mgr-onion
Config: Move the 'Display' settings from ConfigManager to the layered config system
2019-04-21 00:01:47 -04:00
Jordan Woyak
779e618046 VideoCommon: Change free-look's middle-mouse action to roll the camera. 2019-04-17 05:10:11 -05:00
iwubcode
840afc2ad4 Config: Move the 'Display' settings from ConfigManager to the layered config system 2019-03-30 18:43:02 -05:00
spycrab
0a3279ae6b Fix ImGui key mapping Enter to the numpad 2019-03-21 13:16:21 +01:00
spycrab
70da86f1c3 Qt: Use ModalMessageBox everywhere 2019-03-04 21:53:02 +01:00
JosJuice
b14e540671
Merge pull request #7736 from stenzek/imgui-hidpi
RenderWidget: Fix mouse position for imgui on hidpi screens
2019-01-25 22:45:31 +01:00
spycrab
f908612452 DolphinQt: Fix some warnings 2019-01-25 17:21:38 +01:00
Stenzek
3d8145af65 RenderWidget: Fix mouse position for imgui on hidpi screens 2019-01-26 01:31:58 +10:00
Stenzek
36ce47635b RenderWidget: Hook up to ImGui 2019-01-25 11:15:57 +10:00
Dan B
d69740c8b4 Reimplement savestate loading via drag and drop 2019-01-16 21:19:31 +01:00
Stenzek
eb284b5d66 VideoBackends: Pass window system info from host on creation 2018-10-20 21:11:34 +10:00
Stenzek
a3961750a7 Drop Host_GetRenderSurface and pass display to backend 2018-10-20 21:11:34 +10:00
spycrab
13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00