Commit graph

123 commits

Author SHA1 Message Date
Megamouse 3002e592c3 gs_frame: remove unnecessary CallFromMainThread
Qt events should run on the main thread anyway.
2022-04-01 18:38:37 +02:00
Megamouse 4f12f8b04f Qt: fix GracefulShutdown regression
By replacing Emu.Stop() with GracefulShutdown() in gs_frame::close(), the game window was now unknowingly closed recursively, causing RPCS3 to crash in some cases.
Let's just ignore any consecutive calls to close() from now on.
Also don't close the window internally on a close event. request a shutdown instead.
2022-04-01 18:38:37 +02:00
Megamouse 93e7988df7 rsx: add boost mode shortcut 2022-02-20 11:56:11 +01:00
Megamouse d172b9add6 Rename CallAfter to CallFromMainThread 2022-02-07 19:42:08 +01:00
Eladash e951c619c5
Implement Emulator::GracefulShutdown() 2022-02-05 11:49:29 +01:00
Megamouse 56fe450959 Qt: fix screenshot path creation 2021-12-10 17:27:52 +01:00
Megamouse 88d0b7d135 cellAvconfExt: add some trivial param checks 2021-12-01 21:55:53 +01:00
kd-11 22a7b026e7 rsx: Fix image scaling
- Specifically fixes a corner case where double transforms are required.
  Technically this can be made more readable using transformation matrices:
  * M1 = transform_virtual_to_physical()
  * M2 = transform_image_to_virtual()
  * M3 = M1 * M2
  * Result = Input * M3
  But we don't use a CPU-side matrix library and it is not reasonable to do this on the GPU.
2021-12-01 21:55:53 +01:00
Megamouse c8d4a0dcdc VK/GL: honor game's aspect ratio when scaling 2021-12-01 21:55:53 +01:00
Megamouse ff5e31f396 overlays: add system sounds 2021-11-15 23:03:30 +01:00
Megamouse f258ae795c Add more logging for Emulator Stop events
This should give us more insight into the conditions that cause emulation stops.
This may also help find false issue reports.
2021-10-31 04:12:47 +01:00
Megamouse d5ca9dacb6 Qt: add sound-effect to screenshots 2021-10-26 09:18:37 +02:00
illusion0001 00c87a8fc9 Screenshot: add Title ID to filename 2021-10-24 13:12:01 +02:00
illusion0001 c549d7154b Screenshot: sort folders by Title IDs 2021-10-24 05:24:18 +02:00
Megamouse 8b3a3e4ac8 Qt/Linux: Properly hide taskbar progress when done 2021-09-29 22:38:50 +02:00
Megamouse da4f4dafbd overlays: Show feedback while stopping ppu compilation 2021-09-16 22:18:43 +02:00
Megamouse a09c2dbdd7 Qt: fix newlines. someone™️ changed to richtext 2021-08-28 11:15:43 +02:00
kd-11 4953e79588 Add workaround for wayland session 2021-08-21 21:40:19 +03:00
ibancel 77c191df42 Qt: add fullscreen mouse lock setting 2021-07-29 22:55:55 +02:00
Megamouse 737b0dfd42 Qt: use last window state when leaving fullscreen 2021-07-21 02:39:26 +02:00
Megamouse 66371457fd Qt: fix game window positions if the window is bigger than the screen
If the screen was smaller than the game window, then the window would pop up top right offscreen.
The fix itself was really simple and obvious from the beginning, just some missing clamping.
But I figured it might be less confusing if I add some prosa.
Especially because it took me a couple of hours to figure out why I made it so complex in the first place.
Btw, there might still be some offset to the left occasionally, but that seems to be an upstream issue
2021-07-21 01:15:01 +02:00
Megamouse 35a380676e Qt: add missing key auto repeat checks 2021-06-14 19:02:59 +02:00
Megamouse 83d3658ef0 scale debug overlay based on current dpi settings
Depending on the dpi settings, the debug overlay was almost unreadable.
I also took the liberty to refactor some redundant client size calls and to add some margin to the left of the debug text.
2021-05-26 20:31:29 +02:00
dio-gh ddea45160b GUI: take out some unwise shortcuts
Removes the ability to stop or restart emulation via keyboard shortcuts
while the game is running. Prevents loss of work that can happen due to
the current bindings conflicting with very-widely established shortcuts.

Ctrl+C and Ctrl+E will now be unbound, and Ctrl+R will now mean Resume.
Strings that mention these keybinds were adjusted accordingly.
2021-04-20 19:46:47 +03:00
Megamouse b2317543c8 Qt: Fix initial gs_frame position on multi-monitor 2021-04-19 10:44:48 +02:00
Megamouse 03b76b4606 Emu: some cleanup 2021-04-09 21:03:49 +02:00
Megamouse e557c962fb Qt: gs_frame position updates 2021-03-30 19:09:01 +02:00
Eladash aad5283786 Fix Emulator::IsPaused() 2021-03-30 10:21:54 +03:00
Nekotekina 52fe86b56c fixed_typemap.hpp: make it a bit fool-proof
Require objects to be non-copyable (move is still allowed).
2021-03-02 21:58:49 +03:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Megamouse 0b5c6350ae
cellScreenshot: fix overlay scaling (#9867)
* cellScreenshot: fix overlay scaling
2021-02-28 23:00:49 +00:00
Megamouse a7c9827ad4
Improve cellScreenshot (#9851)
* Fix screenshot logging

* Update libpng to 1.6.37

* cellScreenshot: Write text chunks
* cellScreenshot: add overlay image
* screenshot_manager: add /dev_hdd0/photo/

* read_png_file: use deleter instead of manual close

* cellScreenshot: use Qt for overlays
* cellScreenshot: don't apply overlay to regular img
* screenshot_manager: add mount hack for VFS
* cellScreenshot: escape the whole path
2021-02-28 22:05:04 +03:00
Megamouse be26810cd7 RSX: Implement set_value for progress dialogs 2021-01-31 15:02:26 +01:00
Eladash b96864c7e6 rsx: Improve gs frame exit workaround
Move to close(), hide before potential hanging at Emu.Stop()
2021-01-23 12:45:53 +03:00
Eladash 79513f06a4 rsx/gui: Delay game window pop-up until first frame 2021-01-23 12:45:53 +03:00
Nekotekina b7bf316c1a Don't randomly include "stdafx.h"
It's file for precompiled headers.
Include what is used, don't rely on transitive includes.
2020-12-22 14:32:30 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina eb66302907 atomic.hpp: replace std::atomic with atomic_t
Dual dependency is nothing good.
2020-12-07 17:13:12 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Megamouse 5076da8f77 Fix auto exit
- Don't quit on stop if force boot was set
- Don't stop the emulator on gs_frame close when it was already stopped. This would remove the force boot flag by mistake.
2020-11-24 11:17:03 +03:00
Megamouse 2cee26c3e7 Cleanup some includes 2020-10-31 11:53:46 +01:00
Megamouse 4c70864588 Add rsx capture shortcut 2020-09-16 21:57:55 +02:00
Megamouse a845a0395a Input/Qt: Properly reset mouse hide timer 2020-09-09 00:22:48 +02:00
Megamouse 006f546e7c Fix idle timer 2020-09-02 14:22:00 +02:00
Megamouse 1dac01498c Update mouse lock logic
- fix headers
- update cursor whenever the mouse is moved
- unify cursor logic
- move m_mouse_hide_and_lock logic to handle_cursor (toggle_fullscreen is the trigger, not the handler)
- disable mouse lock and idle timer if the window is inactive
2020-09-02 14:22:00 +02:00
Bevan Weiss ae0e454fc2 Use dynamic_cast to convert QWindow m_target to gs_frame
Used to access get_mouse_lock_state rather than going through the QWindow property tables.

Modify mouse hide and lock to default OFF when entering Windowed mode, and to default ON when entering Fullscreen unless 'show cursor in fullscreen' is configured
2020-09-02 14:22:00 +02:00
Bevan Weiss ca3ee019cc GUI: Mouse Hide and Lock Keyboard Shortcut
This should address the second point of #4502.

A few notes:
1. it changes the current behaviour of the 'Fullscreen cursor'.  Currently it defaults to be captive.  This changes it so that it defaults to NOT being captive, but can be made captive with the CTRL+L key combination.
2. There are situations when in windowed mode it's possible to escape the captivity (it's like a minigame if you will).  This requires the mouse movement to exceed the bounds of the window in a single event scan.  It will just show up as a temporary visibility of the cursor when outside of the window bounds.  It's not too difficult to 'fix', but might not be a likely enough scenario to warrant either.
3. There currently isn't an ability to change what this keyboard combo maps to, but it's inline with a collection of other similar keyboard mappings.  I think adding such a more generic keyboard mapping system (not for just keypad items, but system items.. e.g. so that Emulator stop could be mapped to something other than CTRL+S etc) is a bit out-of-scope of this particular PR.
2020-09-02 14:22:00 +02:00
Bevan Weiss 9a51f22265 Remove call to start m_mousehide_timer in gs_frame constructor 2020-08-29 16:14:11 +02:00
Bevan Weiss 144b185802 Woops... premature commit/push.
Fixed up the usage of connect
2020-08-29 16:14:11 +02:00
Bevan Weiss 3c0f6a2919 Used new Qt connect syntax
Fixed indenting
Renamed click callback argument from 'val'->'checked'
Converted m_gui re-usage to just reference ui
Removed implicit capture from spinbox lambda
Corrected millisecond acronym from mS->ms
Removed superfluous QTimer include in gs_frame.cpp
2020-08-29 16:14:11 +02:00