0
0
Fork 0
Commit graph

394 commits

Author SHA1 Message Date
Adryzz (OLED Edition)
bc00a251dd
Fix direct mouse access checkbox label (#2827)
* Fix direct mouse access checkbox label

* Change UI label so that the mouse is a pointing device
2021-11-10 15:21:51 -03:00
gdkchan
a7a40a77f2
Add support for the brazilian portuguese language code (#2792)
* Add support for the brazilian portuguese language code

* Fix error applet message
2021-10-28 23:06:45 +02:00
Ac_K
d1604aa762
nvdec: Adding Vp8 codec support (#2707)
* first try

* second try

* working update

* Final impl

* Fixes nits

* Fix everything

* remove leftover

* Update FFmpegContext.cs

* Update Surface.cs

* Addresses gdkchan feedback

* bool not byte

* Addresses gdkchan feedback
2021-10-12 22:55:57 +02:00
Caian Benedicto
380b95bc59
Inline software keyboard without input pop up dialog (#2180)
* Initial implementation

* Refactor dynamic text input keys out to facilitate configuration via UI

* Fix code styling

* Add per applet indirect layer handles

* Remove static functions from SoftwareKeyboardRenderer

* Remove inline keyboard reset delay

* Remove inline keyboard V2 responses

* Add inline keyboard soft-lock recovering

* Add comments

* Forward accept and cancel key names to the keyboard and add soft-lock prevention line

* Add dummy window to handle paste events

* Rework inline keyboard state machine and graphics

* Implement IHostUiHandler interfaces on headless WindowBase class

* Add inline keyboard assets

* Fix coding style

* Fix coding style

* Change mode cycling shortcut to F6

* Fix invalid calc size error in games using extended calc

* Remove unnecessary namespaces
2021-10-12 21:54:21 +02:00
mpnico
fe9d5a1981
Fix problems added by Pause (#2645)
* Disable Pause/Resume menu instead of trying to hide them

* Fix Resume menu being active before renderer starts

* Fix emulator not being able to close properly
2021-09-18 14:31:44 +02:00
Ac_K
d327e809c9
gui: Hotfix for FileChooserNative during section extraction (#2644)
Fix a regression introduced in #2633, FileChooserNative parent can't be set to null because it's running in modal.
2021-09-16 00:09:48 +02:00
MutantAura
843401635a
Adjustments to framerate metric and addition of frametime (#2638)
* Adjust framerate data and add frametime

* Update PerformanceStatistics.cs

* Revert deletions of average framerate

* Update Ryujinx.csproj

* Remove separate GTK column

* Increase FPS precision

* general cleanup

* even generaler cleanup

* fix dumb

* Remove legacy code

* Update PerformanceStatistics.cs

* Update PerformanceStatistics.cs
2021-09-15 02:26:10 +02:00
Ac_K
3f2486342b
gui: Replace FileChooserDialog by FileChooserNative (#2633)
We currently use the FileChooser from GTK, which is a bit mess. Instead of it we could use the native FileChooser from all specifics OS. This is what this PR attempt to fix.

It could be nice to get a test under linux since I've only tested it under Windows without any issues.

Fixes #2584
2021-09-14 23:52:08 +02:00
mpnico
117e32a6ff
Implement a "Pause Emulation" option & hotkey (#2428)
* Add a "Pause Emulation" option and hotkey

Closes Ryujinx#1604

* Refactoring how pause is handled

* Applied suggested changes from review

* Applied suggested fixes

* Pass correct suspend type to threads for suspend/resume

* Fix NRE after stoping emulation

* Removing SimulateWakeUpMessage call after resuming emulation

* Skip suspending non game process

* Pause the tickCounter in the ExecutionContext

* Refactoring tickCounter pause/resume as suggested

* Fix Config migration to add pause hotkey

* Fixed pausing only application threads

* Fix exiting emulator while paused

* Avoid pause/resume while already paused/resumed

* Cleanup unused code

* Avoid restarting audio if stopping emulation while in pause.

* Added suggested changes

* Fix ConfigurationState
2021-09-11 22:08:25 +02:00
Agustin Insua
197f587802
Fix GTK3 mapping for single quote key (#2612) 2021-09-11 21:32:36 +02:00
Agustin Insua
bcbe6ef6cd
Update game metadata when stopping emulation (#2610)
* Update game metadata when stopping emulation

* Fix formatting
2021-09-11 21:16:48 +02:00
bobhope
830d1f097d
Remove file error popup (#2547)
* Added check to detect if application file is more than zero bytes long

* Removed file error popup

* Removed unnecessary usings

* Added empty lines
2021-09-11 20:59:11 +02:00
riperiperi
ec3e848d79
Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501)
* Initial Implementation

About as fast as nvidia GL multithreading, can be improved with faster command queuing.

* Struct based command list

Speeds up a bit. Still a lot of time lost to resource copy.

* Do shader init while the render thread is active.

* Introduce circular span pool V1

Ideally should be able to use structs instead of references for storing these spans on commands. Will try that next.

* Refactor SpanRef some more

Use a struct to represent SpanRef, rather than a reference.

* Flush buffers on background thread

* Use a span for UpdateRenderScale.

Much faster than copying the array.

* Calculate command size using reflection

* WIP parallel shaders

* Some minor optimisation

* Only 2 max refs per command now.

The command with 3 refs is gone. 😌

* Don't cast on the GPU side

* Remove redundant casts, force sync on window present

* Fix Shader Cache

* Fix host shader save.

* Fixup to work with new renderer stuff

* Make command Run static, use array of delegates as lookup

Profile says this takes less time than the previous way.

* Bring up to date

* Add settings toggle. Fix Muiltithreading Off mode.

* Fix warning.

* Release tracking lock for flushes

* Fix Conditional Render fast path with threaded gal

* Make handle iteration safe when releasing the lock

This is mostly temporary.

* Attempt to set backend threading on driver

Only really works on nvidia before launching a game.

* Fix race condition with BufferModifiedRangeList, exceptions in tracking actions

* Update buffer set commands

* Some cleanup

* Only use stutter workaround when using opengl renderer non-threaded

* Add host-conditional reservation of counter events

There has always been the possibility that conditional rendering could use a query object just as it is disposed by the counter queue. This change makes it so that when the host decides to use host conditional rendering, the query object is reserved so that it cannot be deleted. Counter events can optionally start reserved, as the threaded implementation can reserve them before the backend creates them, and there would otherwise be a short amount of time where the counter queue could dispose the event before a call to reserve it could be made.

* Address Feedback

* Make counter flush tracked again.

Hopefully does not cause any issues this time.

* Wait for FlushTo on the main queue thread.

Currently assumes only one thread will want to FlushTo (in this case, the GPU thread)

* Add SDL2 headless integration

* Add HLE macro commands.

Co-authored-by: Mary <mary@mary.zone>
2021-08-27 00:31:29 +02:00
VocalFan
686b63e479
Added fallbacks for all Audio Backends (#2582)
* Added fallbacks for all Audio Backends

* Commit Suggestion

Co-authored-by: gdkchan <gab.dark.100@gmail.com>

* Resolve elses.

* Revert "Resolve elses."

This reverts commit 9aec3e9e7750803e5626da3d01d7e57fabe19f65.

* Suggestions completed

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2021-08-26 23:03:19 +02:00
VocalFan
d753de6d5d
Seeing if there are any other spelling errors to correct. (#2572)
* "Informations" -> "Information"

* Your -> You

* will use -> using (Plus more detailed Appveyor error msg.)

* Did a dumb thing, fixed it.
2021-08-20 18:48:00 -03:00
Alex Barney
dadc0e59da
Update to LibHac 0.13.1 (#2475)
* Update to LibHac 0.13.1

* Recreate directories for indexed saves if they're missing on emulator start
2021-08-12 23:56:24 +02:00
ooa113y
3977d1f72b
Improve firmware install error due to outdated keys (#2541) 2021-08-12 17:48:15 -03:00
gdkchan
8196086f7a
Revert "Calculate vertex buffer sizes from index buffer (#1663)" (#2544)
This reverts commit 10d649e6d3.
2021-08-11 22:13:48 -03:00
gdkchan
10d649e6d3
Calculate vertex buffer sizes from index buffer (#1663)
* Calculate vertex buffer size from maximum index buffer index

* Increase maximum index buffer count for it to be considered profitable for counting
2021-08-11 22:06:09 +02:00
mpnico
70f79e689b
Implement vibrations (#2468)
* First working vibration implementation

* Fix Infinite Rumble in SDL2Mouse

* Stop ignoring one vibValues every 2

* Remove RumbleInfinity as suggested

* Reworked all the vibration handle / calculation

* Revert HidVibrationDevicePosition changes

* Add UI to enable and tune rumble

* Remove some stub logs

* Add PlayerIndex in rumble debug log

* Fix all requested changes

* Implements hid::GetVibrationDeviceInfo

* Better implements HidVibrationValue.Equals/GetHashCode

* Added requested changes from code review

* Last fixes from review

* Update configuration file version for rebase
2021-08-05 00:39:40 +02:00
ooa113y
46ffc81d90
Hide UI rework/arrow key fix (#2504)
* Unbreak arrow keys

* Use bitshift for Flags instead of literal
2021-08-04 23:28:19 +02:00
gdkchan
a27986c311
Make audio disposal thread safe on all 3 backends (#2527)
* Make audio disposal thread safe on all 3 backends

* Make OpenAL more consistent with the other backends

* Remove Window.Cursor = null, and change dummy TValue to byte
2021-08-04 15:28:33 -03:00
ooa113y
06cd3abe6c
Implement "hide UI" option (#2411)
* Implement jduncanator method

* Rename function/button ID

* Move option to Actions menu (makes no sense while emulation is inactive...)
2021-07-24 20:48:00 +02:00
Mary
208ba1dde2 Revert LibHac update
Users are facing save destruction on failing extra data update apparently
2021-07-13 16:48:54 +02:00
Alex Barney
19afb3209c
Update to LibHac 0.13.1 (#2328)
Update the LibHac dependency to version 0.13.1. This brings a ton of improvements and changes such as:
- Refactor `FsSrv` to match the official refactoring done in FS.
- Change how the `Horizon` and `HorizonClient` classes are handled. Each client created represents a different process with its own process ID and client state.
- Add FS access control to handle permissions for FS service method calls.
- Add FS program registry to keep track of the program ID, location and permissions of each process.
- Add FS program index map info manager to track the program IDs and indexes of multi-application programs.
- Add all FS IPC interfaces.
- Rewrite `Fs.Fsa` code to be more accurate.
- Rewrite a lot of `FsSrv` code to be more accurate.
- Extend directory save data to store `SaveDataExtraData`
- Extend directory save data to lock the save directory to allow only one accessor at a time.
- Improve waiting and retrying when encountering access issues in `LocalFileSystem` and `DirectorySaveDataFileSystem`.
- More `IFileSystemProxy` methods should work now.
- Probably a bunch more stuff.

On the Ryujinx side:
- Forward most `IFileSystemProxy` methods to LibHac.
- Register programs and program index map info when launching an application.
- Remove hacks and workarounds for missing LibHac functionality.
- Recreate missing save data extra data found on emulator startup.
- Create system save data that wasn't indexed correctly on an older LibHac version.

`FsSrv` now enforces access control for each process. When a process tries to open a save data file system, FS reads the save's extra data to determine who the save owner is and if the caller has permission to open the save data. Previously-created save data did not have extra data created when the save was created.
With access control checks in place, this means that processes with no permissions (most games) wouldn't be able to access their own save data. The extra data can be partially created from data in the save data indexer, which should be enough for access control purposes.
2021-07-13 01:19:28 -07:00
emmauss
b0ac1ade7f
Add portable screenshot folder (#2447)
* add portable screenshot folder

* fix style

Co-authored-by: Ac_K <Acoustik666@gmail.com>

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-07-06 21:07:23 +02:00
Ac_K
a6c2b5d6ec
ui: Fixes GetShrinkedGamepadName (#2444)
There is a wrong condition in `GetShrinkedGamepadName` which throw an oob if the controller name is equal to the checked value. It's now fixed and shoud closes #2442 .
2021-07-06 20:55:03 +02:00
mpnico
091edcebb4
Command line argument -f doesn't toggle 'Start games in fullscreen mode' (#2424)
Closes Ryujinx#2308
2021-07-06 20:04:21 +02:00
emmauss
28618c58d7
Add Screenshot Feature (#2354)
* Add internal screenshot  capabilities

* update version notice
2021-06-28 22:09:43 +02:00
Ac_K
a79b39b913
no name: Mii Editor applet support (#2419)
* no name: Mii Editor applet support

* addresses gdkchan feedback

* Fix comment

* Bypass MountCounter of MiiDatabaseManager

* Fix GetSettingsPlatformRegion

* Disable Applet Menu for unsupported firmwares
2021-06-28 20:54:45 +02:00
ooa113y
3359b0fd97
Improve gameTable search (#2398)
* Improve gameTable search

* Remove useless split

* Remove unneeded brackets

* Simplify searchEqualFunc

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Remove leftovers (oops)

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-06-24 02:21:52 +02:00
emmauss
77aab9aca3
Add Direct Mouse Support (#2374)
* and direct mouse support

* and direct mouse support

* hide cursor if mouse enabled

* add config

* update docs

* sorted usings
2021-06-24 02:09:08 +02:00
gdkchan
aea7a6631c
Reduce number of dlls on distribution with single file publish (#2211)
* Enable single file publish

* Set DebugType to embedded on build scripts
2021-06-24 00:40:19 +02:00
Ac_K
d6b2ac33aa
input: Fixes TouchPoint wrong attribute (#2390) 2021-06-23 23:44:09 +02:00
ooa113y
9efe124fc5
Unbind input on middle click (#2358)
* Unbind input on middle click

* Clear _middleMousePressed unconditionally

* Remove unneded initialization code

* Swap conditions

* CR fixes
2021-06-23 22:51:29 +02:00
Mary
39b25dc124
Miria: Make default profile loads Pro Controller by default (#2368)
This was a regression introduced by Miria.
2021-06-17 03:48:55 +02:00
emmauss
bfcc6a8ad6
Add TouchScreen Manager (#2333) 2021-06-14 08:42:55 +02:00
EmulationFanatic
b898bc84ce
Increase height of Settings Window (#2355) 2021-06-10 13:15:41 +02:00
riperiperi
54ea2285f0
POWER - Performance Optimizations With Extensive Ramifications (#2286)
* Refactoring of KMemoryManager class

* Replace some trivial uses of DRAM address with VA

* Get rid of GetDramAddressFromVa

* Abstracting more operations on derived page table class

* Run auto-format on KPageTableBase

* Managed to make TryConvertVaToPa private, few uses remains now

* Implement guest physical pages ref counting, remove manual freeing

* Make DoMmuOperation private and call new abstract methods only from the base class

* Pass pages count rather than size on Map/UnmapMemory

* Change memory managers to take host pointers

* Fix a guest memory leak and simplify KPageTable

* Expose new methods for host range query and mapping

* Some refactoring of MapPagesFromClientProcess to allow proper page ref counting and mapping without KPageLists

* Remove more uses of AddVaRangeToPageList, now only one remains (shared memory page checking)

* Add a SharedMemoryStorage class, will be useful for host mapping

* Sayonara AddVaRangeToPageList, you served us well

* Start to implement host memory mapping (WIP)

* Support memory tracking through host exception handling

* Fix some access violations from HLE service guest memory access and CPU

* Fix memory tracking

* Fix mapping list bugs, including a race and a error adding mapping ranges

* Simple page table for memory tracking

* Simple "volatile" region handle mode

* Update UBOs directly (experimental, rough)

* Fix the overlap check

* Only set non-modified buffers as volatile

* Fix some memory tracking issues

* Fix possible race in MapBufferFromClientProcess (block list updates were not locked)

* Write uniform update to memory immediately, only defer the buffer set.

* Fix some memory tracking issues

* Pass correct pages count on shared memory unmap

* Armeilleure Signal Handler v1 + Unix changes

Unix currently behaves like windows, rather than remapping physical

* Actually check if the host platform is unix

* Fix decommit on linux.

* Implement windows 10 placeholder shared memory, fix a buffer issue.

* Make PTC version something that will never match with master

* Remove testing variable for block count

* Add reference count for memory manager, fix dispose

Can still deadlock with OpenAL

* Add address validation, use page table for mapped check, add docs

Might clean up the page table traversing routines.

* Implement batched mapping/tracking.

* Move documentation, fix tests.

* Cleanup uniform buffer update stuff.

* Remove unnecessary assignment.

* Add unsafe host mapped memory switch

On by default. Would be good to turn this off for untrusted code (homebrew, exefs mods) and give the user the option to turn it on manually, though that requires some UI work.

* Remove C# exception handlers

They have issues due to current .NET limitations, so the meilleure one fully replaces them for now.

* Fix MapPhysicalMemory on the software MemoryManager.

* Null check for GetHostAddress, docs

* Add configuration for setting memory manager mode (not in UI yet)

* Add config to UI

* Fix type mismatch on Unix signal handler code emit

* Fix 6GB DRAM mode.

The size can be greater than `uint.MaxValue` when the DRAM is >4GB.

* Address some feedback.

* More detailed error if backing memory cannot be mapped.

* SetLastError on all OS functions for consistency

* Force pages dirty with UBO update instead of setting them directly.

Seems to be much faster across a few games. Need retesting.

* Rebase, configuration rework, fix mem tracking regression

* Fix race in FreePages

* Set memory managers null after decrementing ref count

* Remove readonly keyword, as this is now modified.

* Use a local variable for the signal handler rather than a register.

* Fix bug with buffer resize, and index/uniform buffer binding.

Should fix flickering in games.

* Add InvalidAccessHandler to MemoryTracking

Doesn't do anything yet

* Call invalid access handler on unmapped read/write.

Same rules as the regular memory manager.

* Make unsafe mapped memory its own MemoryManagerType

* Move FlushUboDirty into UpdateState.

* Buffer dirty cache, rather than ubo cache

Much cleaner, may be reusable for Inline2Memory updates.

* This doesn't return anything anymore.

* Add sigaction remove methods, correct a few function signatures.

* Return empty list of physical regions for size 0.

* Also on AddressSpaceManager

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2021-05-24 22:52:44 +02:00
Ac_K
7b8ad1c36c
ffmpeg: Attempt to fix RootPath on some linux distributions (#2292)
* fix ffmpeg lib path

* Check if ffmpeg isn't found

* Move code to FFmpegContext

* Call it in static constructor

* revert static instance

* rollback

* lazy initialization

* Revert "lazy initialization"

This reverts commit f675d26a5d15ade72e41a5ba899ba80aed3c396d.
2021-05-20 18:28:18 +02:00
EmulationFanatic
b5c72b44de
Merge pull request #2177 from riperiperi/feature/parallel-shader-cache
Allow parallel shader compilation when loading a shader cache
2021-05-19 11:39:19 -07:00
riperiperi
778011c12a Remove ForceDedicatedGpu, as the driver utilities will now do that. 2021-05-19 19:26:23 +01:00
Mary
bec67dbef7
misc: Move configuration management to the Ryujinx project (#2269)
* Decouple configuration from Ryujinx.HLE and Ryujinx.Input

* Move Configuration to the Ryujinx project
2021-05-16 17:12:14 +02:00
Mary
701c427659
Miria: Fix GTK3 keyboard mapping (#2273)
I found some mistake I made back when I first wrote the mapping for
Miria.

This fix:
- an offset by one after the tilde key in the mapping.
- F30 being mapped to F29.
2021-05-08 14:53:28 +02:00
Mary
acb1647c86
Fix embedded game rendering (#2275)
This fix an issue when after a relaunch of a game containing other
games (embedded games), the renderer window size would be 1x1.

This bug was introduced by #2260.
2021-05-07 13:37:48 -03:00
Mary
eb056218a1
audio: Implement a SDL2 backend (#2258)
* audio: Implement a SDL2 backend

This adds support to SDL2 as an audio backend.
It has the same compatibility level as OpenAL without its issues.

I also took the liberty of restructuring the SDL2 code to have one
shared project between audio and input.

The configuration version was also incremented.

* Address gdkchan's comments

* Fix update logic

* Add an heuristic to pick the correct target sample count wanted by the game

* Address gdkchan's comments

* Address Ac_k's comments

* Fix audren output

* Address gdkchan's comments
2021-05-05 23:37:09 +02:00
Mary
faac08e638
gtk3: Add base for future Vulkan integration (#2260)
* gtk3: Add base for future Vulkan integration

This PR puts in place the fondation for the future Vulkan integration on
the GTK3 UI.

This also updated SPB to 0.0.3-build14 that fixed a use after free on
XErrorHandler on Linux.

* Address rip's comments

* Merge GLWidget inside GLRenderer

* Clean up and deduplicate renderer implementations

* Address shahil's comments

* Address Ac_K's comments

* Address gdkchan's comments
2021-05-04 18:19:04 +02:00
Mary
1769510a28 Set FFmpeg.AutoGen library search path on Linux
This fix FFmpeg.AutoGen being unable to find system ffmpeg libraries on
Linux.
2021-05-03 10:09:49 +02:00
Ac_K
a00c5cad00
misc: Cleanup Discord Presence (#2262)
* ui: Cleanup Discord Presence

* Clean Timestamps
2021-05-02 22:17:34 +02:00
Mary
fcdfd8a482
Update to FFmpeg 4.4.0 (#2259)
* Update to FFmpeg 4.4.0

As the title say

* Fix warning from 4.4.0
2021-05-02 22:08:35 +02:00