Commit graph

356 commits

Author SHA1 Message Date
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 f675d26a5d.
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
Mark Araujo
1998a3a90a
Changes ordering of config.json and configuration files (#2253)
This allows configuration values to be written to log file for analysis
2021-04-30 21:39:42 +02:00
Ac_K
c46f6879ff
account: add Custom User Profiles support (#2227)
* Initial Impl

* Fix names

* remove useless ContentManager

* Support backgrounds and improve avatar loading

* Fix firmware checks

* Addresses gdkchan feedback
2021-04-23 22:26:31 +02:00
riperiperi
1239c82d2f Forcibly enable threaded optimization on boot. 2021-04-18 17:34:00 +01:00
Mary
6cb22c9d38
Miria: The Death of OpenTK 3 (#2194)
* openal: Update to OpenTK 4

* Ryujinx.Graphics.OpenGL: Update to OpenTK 4

* Entirely removed OpenTK 3, still wip

* Use SPB for context creation and handling

Still need to test on GLX and readd input support

* Start implementing a new input system

So far only gamepad are supported, no configuration possible via UI but detected via hotplug/removal

Button mapping backend is implemented

TODO: front end, configuration handling and configuration migration
TODO: keyboard support

* Enforce RGB only framebuffer on the GLWidget

Fix possible transparent window

* Implement UI gamepad frontend

Also fix bad mapping of minus button and ensure gamepad config is updated in real time

* Handle controller being disconnected and reconnected again

* Revert "Enforce RGB only framebuffer on the GLWidget"

This reverts commit 0949715d1a03ec793e35e37f7b610cbff2d63965.

* Fix first color clear

* Filter SDL2 events a bit

* Start working on the keyboard detail

- Rework configuration classes a bit to be more clean.
- Integrate fully the keyboard configuration to the front end (TODO: assigner)
- Start skeleton for the GTK3 keyboard driver

* Add KeyboardStateSnapshot and its integration

* Implement keyboard assigner and GTK3 key mapping

TODO: controller configuration mapping and IGamepad implementation for keyboard

* Add missing SR and SL definitions

* Fix copy pasta mistake on config for previous commit

* Implement IGamepad interface for GTK3 keyboard

* Fix some implementation still being commented in the controller ui for keyboard

* Port screen handle code

* Remove all configuration management code and move HidNew to Hid

* Rename InputConfigNew to InputConfig

* Add a version field to the input config

* Prepare serialization and deserialization of new input config and migrate profile loading and saving

* Support input configuration saving to config and bump config version to 23.

* Clean up in ConfigurationState

* Reference SPB via a nuget package

* Move new input system to Ryujinx.Input project and SDL2 detail to Ryujinx.Input.SDL2

* move GTK3 input to the right directory

* Fix triggers on SDL2

* Update to SDL2 2.0.14 via our own fork

* Update buttons definition for SDL2 2.0.14 and report gamepad features

* Implement motion support again with SDL2

TODO: cemu hooks integration

* Switch to latest of nightly SDL2

* SDL2: Fix bugs in gamepad id matching allowing different gamepad to match on the same device index

* Ensure values are set in UI when the gamepad get hot plugged

* Avoid trying to add controllers in the Update method and don't open SDL2 gamepad instance before checking ids

This fixes permanent rumble of pro controller in some hotplug scenario

* Fix more UI bugs

* Move legcay motion code around before reintegration

* gamecontroller UI tweaks here and there

* Hide Motion on non motion configurations

* Update the TODO grave

Some TODO were fixed long time ago or are quite oudated...

* Integrate cemu hooks motion configuration

* Integrate cemu hooks configuration options to the UI again

* cemuhooks => cemuhooks

* Add cemu hook support again

* Fix regression on normal motion and fix some very nasty bugs around

* Fix for XCB multithreads issue on Linux

* Enable motion by default

* Block inputs in the main view when in the controller configuration window

* Some fixes for the controller ui again

* Add joycon support and fixes other hints

* Bug fixes and clean up

- Invert default mapping if not a Nintendo controller
- Keep alive the controller being selected on the controller window (allow to avoid big delay for controller needing time to init when doing button assignment)
- Clean up hints in use
- Remove debug logs around
- Fixes potential double free with SDL2Gamepad

* Move the button assigner and motion logic to the Ryujinx.Input project

* Reimplement raw keyboard hle input

Also move out the logic of the hotkeys

* Move all remaining Input manager stuffs to the Ryujinx.Input project

* Increment configuration version yet again because of master changes

* Ensure input config isn't null when not present

* Fixes for VS not being nice

* Fix broken gamepad caching logic causing crashes on ui

* Ensure the background context is destroyed

* Update dependencies

* Readd retrocompat with old format of the config to avoid parsing and crashes on those versions

Also updated the debug Config.json

* Document new input APIs

* Isolate SDL2Driver to the project and remove external export of it

* Add support for external gamepad db mappings on SDL2

* Last clean up before PR

* Addresses first part of comments

* Address gdkchan's comments

* Do not use JsonException

* Last comment fixes
2021-04-14 12:28:43 +02:00
VocalFan
978b69b706
[ImgBot] Optimize images (#2205)
*Total -- 555.93kb -> 486.47kb (12.49%)

/Ryujinx/Ui/Resources/Logo_GitHub.png -- 26.25kb -> 15.48kb (41.04%)
/Ryujinx/Ui/Resources/Logo_Discord.png -- 13.29kb -> 7.89kb (40.63%)
/Ryujinx/Ui/Resources/Logo_Patreon.png -- 15.12kb -> 9.79kb (35.27%)
/Ryujinx/Ui/Resources/Icon_NRO.png -- 13.58kb -> 11.06kb (18.5%)
/Ryujinx/Ui/Resources/Icon_NCA.png -- 13.35kb -> 10.96kb (17.92%)
/Ryujinx/Ui/Resources/Icon_NSO.png -- 13.62kb -> 11.20kb (17.76%)
/Ryujinx/Ui/Resources/Icon_XCI.png -- 12.79kb -> 10.53kb (17.61%)
/Ryujinx/Ui/Resources/Icon_NSP.png -- 12.89kb -> 10.66kb (17.32%)
/Ryujinx/Ui/Resources/Logo_Twitter.png -- 16.54kb -> 14.40kb (12.93%)
/Ryujinx/Ui/Resources/Controller_JoyConPair.svg -- 74.83kb -> 65.64kb (12.28%)
/Ryujinx/Ui/Resources/Controller_ProCon.svg -- 66.51kb -> 58.83kb (11.55%)
/Ryujinx/Ui/Resources/Controller_JoyConRight.svg -- 87.82kb -> 80.99kb (7.77%)
/Ryujinx.HLE/HOS/Services/Account/Acc/DefaultUserImage.jpg -- 51.73kb -> 47.85kb (7.49%)
/Ryujinx/Ui/Resources/Controller_JoyConLeft.svg -- 73.68kb -> 68.34kb (7.25%)
/Ryujinx/Ui/Resources/Logo_Amiibo.png -- 11.40kb -> 11.08kb (2.82%)
/Ryujinx/Ui/Resources/Logo_Ryujinx.png -- 52.52kb -> 51.76kb (1.45%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2021-04-14 01:20:30 +02:00
Mark Araujo
faa654dbaf
Improves logging to console. (#2146)
* Restore removed text

* Adds more items to logs:

- Remove #1942

* Further removal of changes from #1942

* Removes hardcoded config state variables for logging
- Adds Configuration logging

* Decoupled logging from ReactiveObject
- Event handler added to Configuration state to handle logging of value changes

* Decoupled logging from ReactiveObject
- Event handler added to Configuration state to handle logging of value changes
2021-04-13 21:58:47 +02:00
Ac_K
7344dee475
account: Adds AccountManager (#2184)
* account: Adds Account Manager

In a way to have Custom User Profiles merged in master faster, this PR adds a `AccountManager` class (based on `AccountUtils` class) and the following changes have been made:
- Adds a "default profile values" which were the old hardcoded ones.
- The image profile is moved to the Account service folder.
- The hardcoded UserId for the savedata is now using the `AccountManager` last opened one.
- The DeviceId in Mii service is changed to the right value (checked by REd sys:set call).

* Fix csproj

* Addresses gdkchan's comments

* Fix UserProfile fields

* Fix mii GetDeviceId()

* Update Ryujinx.HLE.csproj
2021-04-13 03:16:43 +02:00
jms-c
5cb83293bc
Enable updates in portable mode. (related to #1885) (#2181)
* Enable updates in portable mode.

* Added update test!

* Enable update test again!

* Triggering CI

* Made this PR mergeable.
2021-04-09 01:19:21 +02:00
gdkchan
874540bb5c
Allow DRAM size to be increased from 4GB to 6GB (#2174)
* Allow DRAM size to be increased from 4GB to 6GB

* Add option on the UI
2021-04-04 14:06:59 +02:00
Ayato (Shahil)
529df341f1
Update Pro Controller Image + Trigger view (#2128)
* Update Pro Controller Image

This Updates the Pro controller Images.

* fix some nits
2021-04-02 17:09:15 +02:00
Ac_K
e60bae1a94
misc: Add credit to AmiiboAPI properly and fix a wrong warning code (#2150)
* misc: Add credit to AmiiboAPI properly and fix a warning disable

This PR adds a properly credit to AmiiboAPI which is used in our Amiibo emulation in the Readme and in the about window.
I've changed a wrong warning code added in a recent PR too.

* Update README.md

* Fix aligment
2021-03-27 15:41:09 +01:00
Caian Benedicto
0c1ea1212a
Add the TamperMachine module for runtime mods and cheats (#1928)
* Add initial implementation of the Tamper Machine

* Implement Atmosphere opcodes 0, 4 and 9

* Add missing TamperCompilationException class

* Implement Atmosphere conditional and loop opcodes 1, 2 and 3

* Inplement input conditional opcode 8

* Add register store opcode A

* Implement extended pause/resume opcodes FF0 and FF1

* Implement extended log opcode FFF

* Implement extended register conditional opcode C0

* Refactor TamperProgram to an interface

* Moved Atmosphere classes to a separate subdirectory

* Fix OpProcCtrl class not setting process

* Implement extended register save/restore opcodes C1, C2 and C3

* Refactor code emitters to separate classes

* Supress memory access errors from the Tamper Machine

* Add debug information to tamper register and memory writes

* Add block stack check to Atmosphere Cheat compiler

* Add handheld input support to Tamper Machine

* Fix code styling

* Fix build id and cheat case mismatch

* Fix invalid immediate size selection

* Print build ids of the title

* Prevent Tamper Machine from change code regions

* Remove Atmosphere namespace

* Remove empty cheats from the list

* Prevent code modification without disabling the tampering

* Fix missing addressing mode in LoadRegisterWithMemory

* Fix wrong addressing in RegisterConditional

* Add name to the tamper machine thread

* Fix code styling
2021-03-27 15:12:05 +01:00
mageven
69f8722e79
Fix inconsistencies in progress reporting (#2129)
Signal and setup events correctly
Eliminate possible races
Use a single event
Mark volatiles and reduce scope of waithandles
Common handler
100ms -> 50ms
2021-03-22 19:40:07 +01:00
Joshi234
a8c945f35f
Add items to standard logs (#1942)
* Added more items to log

* Update MainWindow.cs

* Added log when changing settings

* fix formating and add log when toggling vsync and docked

* Update Ryujinx/Ui/MainWindow.cs

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

* Update Ryujinx/Ui/MainWindow.cs

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

* Update Ryujinx/Ui/Windows/SettingsWindow.cs

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

* Fix formating

* Change Location according to suggestion

* Implemented OpenDataStorageWithProgramIndex

* Update IFileSystemProxy.cs

* Update IFileSystemProxy.cs

* Commited that file on accidant

* Revert "Merge branch 'master' of https://github.com/Joshi234/Ryujinx"

This reverts commit 375f430455, reversing
changes made to 672e2c8f7d.

* Revert "Update IFileSystemProxy.cs"

This reverts commit 672e2c8f7d.

* Update IFileSystemProxy.cs

* Update ISystemSettingsServer.cs

* removed accidantel addition of IFileSystemProxy.OpenDataStorageWithProgramIndex

* Fix formating and add missing stub

* Update ISystemSettingsServer.cs

* Added more items to log

* Update MainWindow.cs

* Added log when changing settings

* fix formating and add log when toggling vsync and docked

* Fix formating

* Update Ryujinx/Ui/MainWindow.cs

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

* Update Ryujinx/Ui/MainWindow.cs

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

* Update Ryujinx/Ui/Windows/SettingsWindow.cs

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

* Change Location according to suggestion

* Fix Rebase stuff

* Change Logger.Notice to Loger.Info

* Update ISystemSettingsServer.cs

* Update ISystemSettingsServer.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-03-19 00:09:33 +01:00
VocalFan
ca848d6359
Minor wording fixes... Except I'm doing it for all of Ryujinx. (#2078)
* Minor wording fixes

* Exit dialogue.

* Update MainWindow.cs

* Update DlcWindow.cs

* I found an actual typo for once.

* There we go.

* Fix

* Update MainWindow.cs

* MainWindow is done

* Update ControllerWindow.cs
2021-03-18 23:44:39 +01:00
Ac_K
a56423802c
nfp: Amiibo scanning support (#2006)
* Initial Impl.

* You just want me cause I'm next

* Fix some logics

* Fix close button
2021-03-18 21:40:20 +01:00
mageven
e44850fed4
Implement friendlier portable mode (#1885)
* Implement friendlier portable mode

* Remove first run dialog

* Disable updates in portable mode for now

* Convert relative custom paths to absolute ones

Also, fix a regression when custom path doesn't exist
2021-03-15 22:10:36 +01:00
Mary
39f171ece5
Override openal-soft configuration (#2101)
This enforce speaker mode to avoid weird audio quality reduction with
output considered as headphones by Windows (It applies a HRTF or crossfeed filter supposed to improve audio quality, might be a bug on their end)
2021-03-13 21:20:02 +11:00
mageven
ca5d8e58dd
Add progress reporting to PTC and Shader Cache (#2057)
* UI changes

* Add progress reporting to PTC & ShaderCache

* Account for null events and expand docs

Co-authored-by: Joshi234 <46032261+Joshi234@users.noreply.github.com>
2021-03-03 01:39:36 +01:00
mageven
3d04d7ef08
Fix "Hide Cursor on Idle" inefficiency (#2058)
* Rewrite cursor hiding code to be efficient

* Formatting nits
2021-03-02 23:45:33 +01:00
mageven
06a2b03cc9
Revise SystemInfo (#2047)
* Revise SystemInfo

Cleans up and adds a bit more info (logical core count and available mem at launch) to logs.

- Extract CPU name from CPUID when supported.
- Linux: Robust parsing of procfs files
- Windows: Prefer native calls to WMI
- Remove unnecessary virtual specifiers

* Address gdkchan's comments

* Address AcK's comments

* Address formatting nits
2021-03-01 15:22:00 +11:00
Mary
460a98390e
ci: Use Github artifacts for PRs (#2040)
* ci: Use Github artifacts for PRs

This PR extends the build job by upload artifacts for all PRs.
The version of those builds is set to "1.0.0-<git_short_hash>" and those
builds have the updater explicitly disabled.

With this in place, we will be able to disable ApppVeyor on PRs.

* Add actions to comment build links

As Github doesn't provide links to unlogged users, we use nightly.link for that.

* Address Ac_k's comments
2021-02-28 11:56:15 +01:00
VocalFan
fd9d16c3b3
Some minor formal wording for the updater. (#2060)
* Some minor formal wording for the updater.

* Fixed a line.
2021-02-28 11:33:36 +01:00
Mary
f556c80d02
Haydn: Part 1 (#2007)
* Haydn: Part 1

Based on my reverse of audio 11.0.0.

As always, core implementation under LGPLv3 for the same reasons as for Amadeus.

This place the bases of a more flexible audio system while making audout & audin accurate.

This have the following improvements:
- Complete reimplementation of audout and audin.
- Audin currently only have a dummy backend.
- Dramatically reduce CPU usage by up to 50% in common cases (SoundIO and OpenAL).
- Audio Renderer now can output to 5.1 devices when supported.
- Audio Renderer init its backend on demand instead of keeping two up all the time.
- All backends implementation are now in their own project.
- Ryujinx.Audio.Renderer was renamed Ryujinx.Audio and was refactored because of this.

As a note, games having issues with OpenAL haven't improved and will not
because of OpenAL design (stopping when buffers finish playing causing
possible audio "pops" when buffers are very small).

* Update for latest hexkyz's edits on Switchbrew

* audren: Rollback channel configuration changes

* Address gdkchan's comments

* Fix typo in OpenAL backend driver

* Address last comments

* Fix a nit

* Address gdkchan's comments
2021-02-26 01:11:56 +01:00
pineappleEA
1c49089ff0
Fix updater breaking user execute permissions on Unix (#2055)
* Fix updater breaking user run permissions on *nix

The updater currently sets the permissions to user run only when the yes button is clicked, this changes it to run on Updater.cs after it's done updating as it should.

* Fix nits
2021-02-25 10:35:48 +11:00
mageven
fa55d7133a
Pacify updater (#1899)
* Updater: Remove dirs selectively

* Log exceptions from updater async tasks

* Address riperiperi's comments
2021-02-23 16:19:02 +01:00
LDj3SNuD
bcbf240d2e
PPTC: Fix unwanted propagation of a relocatable constant in a specific case. (#1990)
* Fix unwanted propagation of a relocatable constant in a specific case.

* Ptc.InternalVersion = 1990

* Nit to retrigger the Checks.
2021-02-23 13:15:45 +01:00
sharmander
4e26aed816
UI: Multithreaded Updater (#2031)
* Use multiple threads to download different chunks of an update simultaneously. This reduces time to complete the download significantly.

* Remove dirty-flag check (for test purposes)

* Clean up updater code.

* Include fallback to single-threaded updater if mt fails

* Reduce connection count to 4.

* Improve fallback on error.
Correct issue where data was missing during download due to total build size not being cleanly divisble by the connection count.
Cleaned up unnecessary code.

* Add missing return statements

* Fix alignment

* Alignment

* More alignment

* Rely on content-range request instead of xml/json size property.

* Re-instate dirty checking and version checking to move into review stage.

* Address comments

* Address comments

* Comments

* Comments

* Final...?

* final final

* final final final nit

* Use Array.Copy as requested by rip

* Updated some names for clarity.

* Move addition into for loop (to shorten line width)

* Add missing semicolon -- forgot to stage :9
2021-02-22 21:48:45 +01:00
Jose Padilla
ad7d22777f
Controller Input handling refactoring (#1751)
* This should fix issue #1374 in Linux

Changes:
- Bind buttons by detecting the transition from down to up.
- Bind axis by detecting movement from value higher than 50% to a value lower than 50%.

Caveats:
- I have tested only with DS3 in Linux (Fedora 32).
- ZL and ZR detection works by accident. This code doesn't take negative axis into account.
  The reason it works is because axis are managed in absolute value. So when pressing ZL/ZR
  axis value goes from -1 to 1 (or 1 to 0 and back to 1) and this hits the axis detector.
- Likely I have broken all the other controllers xD (testing needed).

* Assign keyboardPressed

* Make a more robust detection of pressed buttons when using a controller

* Add interface to bind buttons from Joystick and Keyboard

* Fix style issues after code review by @AcK77  (Thanks!)

* Move new classes to Ryujinx.Ui.Input namespace

* Use explicit types instead of var

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

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

* Add a new empty line before

* Up

Co-authored-by: Jose Padilla <jose@prensalink.com>
Co-authored-by: Mary <thog@protonmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-02-21 00:22:55 +01:00
sharmander
d5081e3f93
Make windows DPI aware to display properly on high-resolution screens. (#1983)
* Make Windows DPI aware to display properly on high-resolution screens.

* remove empty line

* Don't use app manifest, set process dpi aware programatically.

Store variables in Program.cs for use instead of re-creating them per class/ method.

* Fix for linux/osx

* Add braces

* Re-use manifest. It appears to be required on linux.

* Undo previous commit -- it appears linux was simply never affected.

* Addressed AcK's comments

* Remove unused usings

* Address comments by AcK #2

* Re-order

* Move FromHwnd call to ForceDpiAware class. Wrap in Try-Catch to prevent crashes on systems that don't support it.

* Additional code cleanup

* Remove "global::" reference.
2021-02-20 01:34:41 +01:00
pineappleEA
6f1d964801
Hide Cursor On Idle (#1993)
* Implement "Hide Cursor On Idle" option

Adds a general option to autohide the cursor after 8s have elapsed.

* Fix cursor not hiding on Windows and dispose it

* Don't dispose cursor, fix var names

* Abide by the GNOME documentation

* Fix nits

* Disabled by default, make it so it doesn't utilize any timer

* Remove *NIX time and extra lines

* Don't calculate if option is disabled

* Move if case

* Fix alignment
2021-02-15 22:48:21 +01:00
Ayato (Shahil)
0b02e08b72
Hotfix for Joy-Con Images (#2011)
The Joy-Con images should no longer be stretched on Windows
(P.S I hate Windows :p)
2021-02-11 09:57:39 +01:00
Ayato (Shahil)
172ec326e5
Update Joy-Con images 2 (#2004)
* Update Joy-Con Images 2

This Updates the Joy-Con images, Changes include, adding a top view to the {Joy-Con Pair} image and {Joy-Con Left and Right} Images and adding a side view to {Joy-Con Left and Right} images, the colours
should be less washed out as well and I also decided to clean up the raw image because even though you could not see it in the GUI, the Images themselves looked very messy when opened in a Vector tool

* Fix Sily Right Joy Con mistake

* Make ZL and ZR more visable
2021-02-11 01:34:36 +01:00
Xpl0itR
94f93727cf
Load default config when an invalid config is found (#1008)
- Bind toggle events after setting up their current values. This fixes the issue where the config is saved 10 times when the main window is opened 😬

- Write to disk immediately to decrease the chances of corruption
2021-02-09 10:24:37 +01:00
edisionnano
1319eda8b7
Fix Updater Icon On Linux (#1995)
* Fix Linux Icon

* Fix identation

* Move the icon to the private constructor
2021-02-08 10:27:12 +11:00
EmulationFanatic
9c2f851d39
Add PPTC acronym to settings page (#1974) 2021-01-29 14:20:02 +11:00
ShahilSharma
9eb0ab05c6
Enable Docked Mode by Default (#1953)
Enables Docked Mode by default, since I see no reason to keep it off by Default.
2021-01-28 13:55:01 +11:00
mageven
d1e24ba5c2
Initial Setup: Reload keys before verifying firmware (#1955)
* Initial Setup: Reload keys before verifying firmware

Also, display the NoKeys dialog if keyset is empty when verifying
firmware.

* LoadApplications: Remove the lone debug log and print the error directly
2021-01-26 18:45:07 +01:00