Commit graph

54 commits

Author SHA1 Message Date
Liam
2ee161a0bf core/debugger: Implement new GDB stub debugger 2022-06-01 00:01:25 -04:00
german77
b6d3a7d8cf input_common: touch: Rewrite touch driver to support multiple touch points 2022-05-23 11:01:14 -05:00
ameerj
012963c513 yuzu: Reduce unused includes 2022-03-20 02:25:09 -04:00
german77
2e699e089a yuzu: Fix TAS from rebase 2021-11-24 20:30:29 -06:00
german77
af121ded18 bootmanager: Use cross-platform keyboard input 2021-11-24 20:30:28 -06:00
german77
30de38ee7f kraken: Address comments from review
Fix compiler bug
2021-11-24 20:30:28 -06:00
german77
dfb63175d1 core/hid: Fully implement native mouse 2021-11-24 20:30:28 -06:00
german77
ebfe40dec8 core/hid: Improve accuracy of the keyboard implementation 2021-11-24 20:30:28 -06:00
german77
1698b991c5 yuzu: Use new input on main and bootmanager 2021-11-24 20:30:23 -06:00
german77
00d3c058c5 input_common: Rewrite keyboard 2021-11-24 20:30:22 -06:00
Adam Heinermann
d54e98fb4a Added TAS controls to the menu under Tools 2021-11-21 17:28:47 -08:00
ameerj
4919d2d00f bootmanager: Fix screenshot resolution factor usage
Fixes screenshots at non integer scaling
2021-11-16 22:11:30 +01:00
Morph
773a189055 bootmanager: Forward declare System and SystemResultStatus 2021-10-15 17:35:34 -04:00
Morph
458ab5a916 core: Move ResultStatus outside of System
Allows it to be a forward declaration in other header files.
2021-10-15 17:34:49 -04:00
lat9nq
3aec34df0a yuzu qt: Remove global system instances from config, WaitTree, main 2021-10-07 13:50:13 -04:00
Morph
85a103cf25 yuzu: main: Register a callback for Exit 2021-10-01 23:39:54 -04:00
ReinUsesLisp
2b175430fd bootmanager: Use std::stop_source for stopping emulation
Use its std::stop_token to abort shader cache loading.

Using std::stop_token instead of std::atomic_bool allows the usage of
other utilities like std::stop_callback.
2021-06-22 00:04:57 -03:00
german77
a380976857 inputCommon: Mouse fixes 2021-02-27 17:53:10 -06:00
german
df1070a735 Add mutitouch support for touch screens 2021-01-15 09:05:17 -06:00
gal20
6e102ea048 yuzu/main: fix mouse not showing on move and port citra-emu/citra#5476 2020-12-31 21:16:09 +02:00
Morph
790a9e47eb bootmanager: Add a check whether loading is complete 2020-12-18 10:33:28 -05:00
Rodrigo Locatti
d9c847bdde Merge pull request #4976 from comex/poll-events
Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main thread
2020-11-25 20:44:53 -03:00
bunnei
173d78f71e frontend: yuzu (qt): Register a callback for ExecuteProgram. 2020-11-24 15:18:29 -08:00
comex
bb729eefce Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main thread
EmuWindow::PollEvents was called from the GPU thread (or the CPU thread
in sync-GPU mode) when swapping buffers.  It had three implementations:

- In GRenderWindow, it didn't actually poll events, just set a flag and
  emit a signal to indicate that a frame was displayed.

- In EmuWindow_SDL2_Hide, it did nothing.

- In EmuWindow_SDL2, it did call SDL_PollEvents, but this is wrong
  because SDL_PollEvents is supposed to be called on the thread that set
  up video - in this case, the main thread, which was sleeping in a
  busyloop (regardless of whether sync-GPU was enabled).  On macOS this
  causes a crash.

To fix this:

- Rename EmuWindow::PollEvents to OnFrameDisplayed, and give it a
  default implementation that does nothing.

- In EmuWindow_SDL2, do not override OnFrameDisplayed, but instead have
  the main thread call SDL_WaitEvent in a loop.
2020-11-23 17:58:49 -05:00
Lioncash
752b626714 yuzu/main: Amend lifetime issues with InputSubsystem
Due to the way Qt performs destruction of parent/child widgets, we need
to make the lifetime of the input subsystem shared across the main
window and the render window.
2020-08-29 00:58:11 -04:00
Lioncash
affbf8e188 input_common: Eliminate most global state
Abstracts most of the input mechanisms under an InputSubsystem class
that is managed by the frontends, eliminating any static constructors
and destructors. This gets rid of global accessor functions and also
allows the frontends to have a more fine-grained control over the
lifecycle of the input subsystem.

This also makes it explicit which interfaces rely on the input subsystem
instead of making it opaque in the interface functions. All that remains
to migrate over is the factories, which can be done in a separate
change.
2020-08-27 16:11:17 -04:00
Fernando Sahmkow
adc86e3030 Clang Format. 2020-06-27 11:36:14 -04:00
Fernando Sahmkow
7ee76003ad General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host 
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and 
Suspended State, Recreates the bootmanager, Initializes Multicore 
system.
2020-06-27 11:35:06 -04:00
ReinUsesLisp
30bbdc653c yuzu: Drop SDL2 and Qt frontend Vulkan requirements
Create Vulkan instances and surfaces from the Vulkan backend.
2020-04-07 16:32:19 -03:00
James Rowe
c935a1a475 Address review and fix broken yuzu-tester build 2020-03-25 23:32:42 -06:00
James Rowe
b37d69e5e1 Frontend/GPU: Refactor context management
Changes the GraphicsContext to be managed by the GPU core. This
eliminates the need for the frontends to fool around with tricky
MakeCurrent/DoneCurrent calls that are dependent on the settings (such
as async gpu option).

This also refactors out the need to use QWidget::fromWindowContainer as
that caused issues with focus and input handling. Now we use a regular
QWidget and just access the native windowHandle() directly.

Another change is removing the debug tool setting in FrameMailbox.
Instead of trying to block the frontend until a new frame is ready, the
core will now take over presentation and draw directly to the window if
the renderer detects that its hooked by NSight or RenderDoc

Lastly, since it was in the way, I removed ScopeAcquireWindowContext and
replaced it with a simple subclass in GraphicsContext that achieves the
same result
2020-03-24 21:03:42 -06:00
bunnei
0f0268bdd9 frontend: qt: bootmanager: Acquire a shared context in main emu thread. 2020-02-25 21:23:02 -05:00
bunnei
ba6d264342 frontend: qt: bootmanager: Vulkan: Restore support for VK backend. 2020-02-25 21:23:01 -05:00
bunnei
02f323f6e8 frontend: qt: bootmanager: OpenGL: Implement separate presentation thread. 2020-02-25 21:23:01 -05:00
ReinUsesLisp
48cb021c34 yuzu: Implement Vulkan frontend
Adds a Qt and SDL2 frontend for Vulkan. It also finishes the missing
bits on Vulkan initialization.
2020-01-29 17:53:11 -03:00
Lioncash
564f80d4fd yuzu/bootmanager: Treat the resolution factor as a u32
Treating it as a u16 can result in a sign-conversion warning when
performing arithmetic with it, as u16 promotes to an int when aritmetic
is performed on it, not unsigned int.

This also makes the interface more uniform, as the layout interface now
operates on u32 across the board.
2019-06-03 15:34:31 -04:00
Lioncash
c0600099bd yuzu/bootmanager: Default EmuThread's destructor in the cpp file
This class contains non-trivial members, so we should default the
destructor's definition within the cpp file.
2019-06-03 15:34:31 -04:00
Lioncash
982ebbb022 yuzu/bootmanager: unsigned -> u32
Same thing (for platforms we support), less reading.
2019-06-03 15:34:31 -04:00
Lioncash
8d120b9121 yuzu/bootmanager: Remove pointer downcast in GRenderWindow's constructor
We can just pass a pointer to GMainWindow directly and make it a
requirement of the interface. This makes the interface a little safer,
since this would technically otherwise allow any random QWidget to be
the parent of a render window, downcasting it to GMainWindow (which is
undefined behavior).
2019-06-03 15:31:52 -04:00
ReinUsesLisp
2410482b11 emu_window: Pass OnMinimalClientAreaChangeRequest argument by copy
There's no performance improvement in passing an unsigned pair by
reference.
2019-05-26 00:54:13 -03:00
Lioncash
4abe8bb7ee yuzu/bootmanager: Remove unnecessary includes
This include isn't used anymore so it can be removed.
2019-04-16 23:52:57 -04:00
bunnei
116f65a527 Merge pull request #2017 from jroweboy/glwidget
Frontend: Migrate to QOpenGLWindow and support shared contexts
2019-04-13 22:08:40 -04:00
Lioncash
eb88e9d088 general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-01 12:53:47 -04:00
ReinUsesLisp
bc0a7e3b93 bootmanager: Bypass input focus issues 2019-03-25 17:10:34 -03:00
ReinUsesLisp
31ce76cc6c bootmanager: Delete container to avoid crash on game restarting
While we are at it, remove nullptr checks for deletion, since the C++
standard defines that delete does it by its own
2019-03-25 17:10:34 -03:00
ReinUsesLisp
f1e717fbee gl_shader_cache: Link loading screen with disk shader cache load 2019-02-06 22:23:40 -03:00
James Rowe
01a3b4f0de QT Frontend: Migrate to QOpenGLWindow 2019-01-21 16:00:01 -07:00
James Rowe
bd16d2c0cc QT Frontend: Add a Loading screen with progressbar
With shader caches on the horizon, one requirement is to provide visible
feedback for the progress. The shader cache reportedly takes several
minutes to load for large caches that were invalidated, and as such we
should provide a loading screen with progress.

Adds a loading screen widget that will be shown until the first frame of
the game is swapped. This was chosen in case shader caches are not being
used, several games still take more than a few seconds to launch and
could benefit from a loading screen.
2019-01-19 23:34:03 -07:00
zhupengfei
2dbb90ed65 yuzu, video_core: Screenshot functionality
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
2018-12-18 22:54:41 +01:00
NeatNit
f53f1aec9f implemented touch in Qt and SDL
change TouchToPixelPos to return std::pair<int, int>

static_cast (SDL)

various minor style and code improvements

style - PascalCase for function names

made touch events private

const pointer arg in touch events

make TouchToPixelPos a const member function

did I do this right?

braces on barely-multiline if

remove question comment (confirmed in Discord)

fixed consts

remove unused parameter from TouchEndEvent

DRY - High-DPI scaled touch put in separate function

also fixes a bug where if you start touching (with either mouse or touchscreen) and drag the mouse to the LEFT of the emulator window, the touch point jumps to the RIGHT side of the touchscreen; draggin to above the window would make it jump to the bottom.

implicit conversion from QPoint to QPointF, apparently

I have no idea what const even means but I'll put it here anyway

remove unused or used-once variables

make touch scaling functions const, and put their implementations together

removed unused FingerID parameters

QTouchEvent forward declaration; add comment to TouchBegin that was lost in an edit

better DRY in SDL

To do -> TODO(NeatNit)

remove unused include
2018-10-09 20:26:57 +02:00