Commit Graph

2004 Commits

Author SHA1 Message Date
liamwhite ef61d129d3
Merge pull request #11303 from lat9nq/screenshots-configurable
yuzu-qt: Add configuration for screenshot resolution
2023-08-22 11:30:25 -04:00
lat9nq 6fe51b48e9 yuzu-qt: Screenshots depend more on the graphics settings 2023-08-16 16:12:42 -04:00
lat9nq 96c98d09cb yuzu-qt: Implement unspecified screenshot ratio 2023-08-16 00:18:47 -04:00
lat9nq 3e28e85468 settings: Add AspectRatio enum, split res scale function 2023-08-15 22:41:50 -04:00
Liam 50eee9b218 fssystem: rework for yuzu style 2023-08-15 17:47:40 -04:00
Liam 86f6b6b7b2 vfs: expand support for NCA reading 2023-08-15 17:47:25 -04:00
Liam 023b9b38cc general: fix apple clang build 2023-08-09 22:38:37 -04:00
liamwhite fca7d975fd
Merge pull request #10839 from lat9nq/pgc-plus
general: Reimplement per-game configurations
2023-08-02 14:25:52 -04:00
Morph bb4e676155 wall_clock: Increase precision requirements
We are providing a conversion to nanoseconds in NativeClock, which is more precise than the GPU tick.
2023-07-27 18:40:56 -04:00
liamwhite d3da1e6517
Merge pull request #10990 from comex/ubsan
Fixes and workarounds to make UBSan happier on macOS
2023-07-26 10:33:28 -04:00
lat9nq 195403c87c (ui)settings: Add more runtime_modifiable settings 2023-07-25 23:14:13 -04:00
lat9nq 1bc0b673aa backend: Remove usage of explicit operator overload
Causes a crash on MSVC from a race condition on application quit.

Intended to address yuzu-emu/yuzu/issues/11137
2023-07-25 22:53:58 -04:00
lat9nq 397333b2d5 settings: Correct Linkage member impl location 2023-07-25 15:57:55 -04:00
lat9nq b1716a9e14 settings: Set GPU as default ASTC decoder 2023-07-24 16:28:13 -04:00
lat9nq f84e7b4656 settings_common: Document specializations 2023-07-23 16:21:08 -04:00
lat9nq 17b9c1e171 common,qt-config: Remove usage of forward_list 2023-07-21 23:09:09 -04:00
liamwhite 8927f016e1
Merge pull request #11069 from lat9nq/mingw-no-tzdb
common: Use arithmetic instead of string ops to get time zone
2023-07-21 15:05:59 -04:00
lat9nq 2911988b85 settings_common: Use a vector in category linkage
Improve storage requirements.
2023-07-21 10:56:55 -04:00
lat9nq ffb384463f settings: Remove sorting from log
Unecessary, and would run every time the settings are logged.
2023-07-21 10:56:55 -04:00
lat9nq 3211623192 common: Move global configuration state modifiers back to settings 2023-07-21 10:56:55 -04:00
lat9nq b02e7eea78 settings_setting: Fix typo 2023-07-21 10:56:55 -04:00
lat9nq 1e093767a8 common,configure_system: Rename method to GetCategory
Fixes essentially a shadowing issue.
2023-07-21 10:56:55 -04:00
lat9nq 267f3c7905 settings: Cleanup
Addresses review feedback

Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2023-07-21 10:56:55 -04:00
lat9nq 127b3da0f1 core,common: Give memory layout setting an enum
Allows for 6GB and 8GB layouts to be selected.
2023-07-21 10:56:55 -04:00
lat9nq ff6a5031d5 settings: Require time zone setting value for stirng 2023-07-21 10:56:55 -04:00
lat9nq e7f01128f1 settings: Give indices to enums 2023-07-21 10:56:55 -04:00
lat9nq 52cc7b438b settings_common: Remove unncessary enum spec 2023-07-21 10:56:55 -04:00
lat9nq 8497fb0a04 settings_enums: Remove casting
Not sure how I missed this earlier, but these vectors can be constructed
using the type of the enum.
2023-07-21 10:56:55 -04:00
lat9nq 54d58130a0 settings_setting: Silence shadowing warnings 2023-07-21 10:56:55 -04:00
lat9nq 926f3e3d3e settings,configuration: Add a default suffix 2023-07-21 10:56:55 -04:00
lat9nq 7f708e8d77 settings: Define paired settings
settings_common: Remove unused optional
2023-07-21 10:56:55 -04:00
lat9nq b2438f1fb7 settings: Define specializations for settings
Suggests to a frontend how to represent each setting.
2023-07-21 10:56:55 -04:00
lat9nq 8b28aa45b9 settings,translation: Fix time zone enum
Renames enum values to conform to naming convention.
2023-07-21 10:56:55 -04:00
lat9nq 8366736b67 settings,opengl,yuzu-qt: Fix AA, Filter maximums
The new enum macros don't support setting values directly.
For LastAA and LastFilter, this means we need a simpler approach to loop
around the toggle in the frontend...
2023-07-21 10:56:55 -04:00
lat9nq 7ffbffe170 settings_enums: More aggressively use macros
This lets us define an enum and all the textual representations
of its values in one swing. All for the price of some ugly macros.
2023-07-21 10:56:55 -04:00
lat9nq fdbeb84168 settings,uisettings: Remove leading underscore 2023-07-21 10:56:55 -04:00
lat9nq 3a7705e774 settings: Move speed_limit to core 2023-07-21 10:56:55 -04:00
lat9nq 3f0cc544cf common,yuzu-qt: Avoid explicit instantiation on old clang
Clang versions < 15 have compile issues with explicit instantiation.
Disable it for these versions.
2023-07-21 10:56:55 -04:00
lat9nq c97cbd089b settings_setting: Fix MSVC error 2023-07-21 10:56:55 -04:00
lat9nq ee32b17782 common,yuzu-qt: GCC warning silences
Fixes -Wshadow, -Wdeprecated, and catch by copy rather than by ref.
2023-07-21 10:56:55 -04:00
lat9nq a0883526d6 settings: Delete cpu_accuracy_first_time
Almost a 2 year old migration setting now
2023-07-21 10:56:54 -04:00
lat9nq 27e53990ed settings: Document BasicSetting, add Ranged 2023-07-21 10:56:54 -04:00
lat9nq b4f2ad3ff5 settings: Move IsConfiguringGlobal to settings_common 2023-07-21 10:56:54 -04:00
lat9nq 11e7e1b8ce settings: Move some simple data to BasicSetting
Reduces the need for the compiler to duplicate this code, by about
100KB executable size.
2023-07-21 10:56:54 -04:00
lat9nq 4903f40efe settings_setting: Fix errors
ToString didn't have a constexpr if statement where needed.
Canonicalize missed an else, causing unreachable code error on MSVC.
2023-07-21 10:56:54 -04:00
lat9nq 04d4b6ab80 (ui,)settings: Use explicit instantiation
Reduces compile times a tad on clang.
2023-07-21 10:56:54 -04:00
lat9nq 02265f19d9 settings: Remove redundant false literals 2023-07-21 10:56:54 -04:00
lat9nq 0193add060 general: Add typeinfo where needed
Using typeid without including typeinfo first produces an ill-formed program.
2023-07-21 10:56:54 -04:00
lat9nq 2fba913d0b settings_enums: Add const type where needed 2023-07-21 10:56:54 -04:00
lat9nq b86171d2b5 settings: yuzu is not capitalized why is it capitalized stop no bad 2023-07-21 10:56:54 -04:00
lat9nq 163f229d26 settings: Reorder
Groups graphics audio and system settings together in a way that
reflects the frontend. This also just conceptually groups them more
nicely than they were.
2023-07-21 10:56:54 -04:00
lat9nq 78b2709373 settings: Report all contained settings values
Also adds a couple characters that denotes the state of the setting.
M for modified, or not default.
C for custom, in context of per-game settings.
2023-07-21 10:56:54 -04:00
lat9nq 8c17a945f7 settings_enums: Cannonicalize settings names
Gives every option of the enums a string literal via a macro.
2023-07-21 10:56:54 -04:00
lat9nq d146dd9d12 settings,general: Rename non-confirming enums 2023-07-21 10:56:54 -04:00
lat9nq 3281ea935f settings: Make volume runtime-configurable 2023-07-21 10:56:07 -04:00
lat9nq 432f68ad29 configure_audio: Implement ui generation
Needs a considerable amount of management specific to some of
the comoboboxes due to the audio engine configuration.

general: Partial audio config implmentation

configure_audio: Implement ui generation

Needs a considerable amount of management specific to some of
the comoboboxes due to the audio engine configuration.

general: Partial audio config implmentation

settings: Make audio settings as enums
2023-07-21 10:56:07 -04:00
lat9nq 88d3de4e85 settings: Split enums to new file 2023-07-21 10:56:07 -04:00
lat9nq 4c4bc134a9 settings, uisettings: Initialize linkage counter 2023-07-21 10:56:07 -04:00
lat9nq 8e15146026 configure_system: Implement with for loop 2023-07-21 10:56:07 -04:00
lat9nq cdb5dea269 settings: Move runtime and save to parameters
These don't need to be whole new types.
2023-07-21 10:56:07 -04:00
lat9nq 464aad52cd settings: Add UiGeneral class 2023-07-21 10:56:07 -04:00
lat9nq d35577d3ed configuration: Implement slider 2023-07-21 10:56:07 -04:00
lat9nq 3a7a5edcea settings: Define base renderer runtime modifiable settings 2023-07-21 10:56:07 -04:00
lat9nq a4de202cbd settings: Add anisotropy mode enum 2023-07-21 10:56:07 -04:00
lat9nq cfb63c68db shared_translation: Finish using int ids 2023-07-21 10:56:07 -04:00
lat9nq bafd569b47 settings,uisettings: Add IDs to settings 2023-07-21 10:56:07 -04:00
lat9nq f8435d676f configure_graphics: Partial runtime implementation 2023-07-21 10:56:07 -04:00
lat9nq 75d7e40113 settings: Recategorize a bit
Will help with generating config UI later.
2023-07-21 10:56:07 -04:00
lat9nq a007ac6b9c configure_graphics_advance: Generate UI at runtime
We can iterate through the AdvancedGraphics settings and generate the UI
during runtime. This doesn't help runtime efficiency, but it helps a ton
in reducing the amount of work a developer needs in order to add a new
setting.
2023-07-21 10:56:07 -04:00
lat9nq 60773194a0 settings: Add a registry of settings
LoadString: Sanitize input

settings: Handle empty string, remove redundant category

settings: Rename Input to Controls, FS to DataStorage

settings: Fix Controls groups information

settings: Move use_docked_mode to System (again)

settings: Document

settings: Add type identification function

settings: Move registry into values

settings: Move global_reset_registry into values

settings: Separate AdvGraphics from Renderer

settings: More document

squash

settings: Use linkage object

uisettings: Move registry into settings

Probably wont build without

uisettings: Use settings linkage object

config: Load settings with a map

Uses the new all_settings vector to load settings.

qt-config: Rename settings category

qt config: Rename to read category

config: Read/write contols category with for_each

This is extremely limited due to the complexity of the Controls group,
but this handles the the settings that use the interface.

qt-config: Use new settings registry

qt-config: Read/write advgrphics

qt-config: Use settings linkage object

yuzu_cmd: Load setting off of vector

cmd-config: Finish settings rename

config: Read controls settings group with for_each

cmd/config: Move registry into values

cmd: Read adv graphics

cmd-config: Use settings linkage object
2023-07-21 10:56:07 -04:00
lat9nq 4133165607 settings,core,config_sys: Remove optional type from custom_rtc, rng_seed
core: Fix MSVC errors
2023-07-21 10:56:07 -04:00
lat9nq 5ccfaf0517 settings: Pool SetGlobal functions 2023-07-21 10:56:07 -04:00
lat9nq 5cffa34288 settings,video_core: Consolidate ASTC decoding options
Just puts them all neatly into one place.
2023-07-21 10:56:07 -04:00
lat9nq 71b3b2a2f0 general: Silence -Wshadow{,-uncaptured-local} warnings
These occur in the latest commits in LLVM Clang.
2023-07-18 19:31:35 -04:00
Morph e0fb1d3d17 ssl: Reorder inclusions 2023-07-17 15:46:24 -04:00
liamwhite 2461c78e3f
Merge pull request #10912 from comex/ssl
Implement SSL service
2023-07-16 16:56:47 -04:00
comex d7c532d889 Fixes and workarounds to make UBSan happier on macOS
There are still some other issues not addressed here, but it's a start.

Workarounds for false-positive reports:

- `RasterizerAccelerated`: Put a gigantic array behind a `unique_ptr`,
  because UBSan has a [hardcoded limit](https://stackoverflow.com/questions/64531383/c-runtime-error-using-fsanitize-undefined-object-has-a-possibly-invalid-vp)
  of how big it thinks objects can be, specifically when dealing with
  offset-to-top values used with multiple inheritance.  Hopefully this
  doesn't have a performance impact.

- `QueryCacheBase::QueryCacheBase`: Avoid an operation that UBSan thinks
  is UB even though it at least arguably isn't.  See the link in the
  comment for more information.

Fixes for correct reports:

- `PageTable`, `Memory`: Use `uintptr_t` values instead of pointers to
  avoid UB from pointer overflow (when pointer arithmetic wraps around
  the address space).

- `KScheduler::Reload`: `thread->GetOwnerProcess()` can be `nullptr`;
  avoid calling methods on it in this case.  (The existing code returns
  a garbage reference to a field, which is then passed into
  `LoadWatchpointArray`, and apparently it's never used, so it's
  harmless in practice but still triggers UBSan.)

- `KAutoObject::Close`: This function calls `this->Destroy()`, which
  overwrites the beginning of the object with junk (specifically a free
  list pointer).  Then it calls `this->UnregisterWithKernel()`.  UBSan
  complains about a type mismatch because the vtable has been
  overwritten, and I believe this is indeed UB.  `UnregisterWithKernel`
  also loads `m_kernel` from the 'freed' object, which seems to be
  technically safe (the overwriting doesn't extend as far as that
  field), but seems dubious.  Switch to a `static` method and load
  `m_kernel` in advance.
2023-07-15 12:00:28 -07:00
lat9nq 63a0a1f826 time_zone: Clean up includes 2023-07-12 03:03:03 -04:00
lat9nq 9e0d6f7d54 time_zone: Swap subtraction order 2023-07-12 03:02:45 -04:00
lat9nq 13755c0903 time_zone: Account for leap years
Protects against invalid hour offsets during transitions to years
following leap years.
2023-07-12 02:34:02 -04:00
bunnei ce7c418e0c
Merge pull request #10996 from Kelebek1/readblock_optimisation
Use spans over guest memory where possible instead of copying data
2023-07-10 18:54:19 -07:00
lat9nq 833306bf5e settings: Disable C++20 tzdb path on MinGW
This path always results in Etc/UTC on MinGW, which often is not
close to the local time zone.
2023-07-10 17:52:35 -04:00
lat9nq 90d76333da time_zone: Remove string ops for determing zone
MinGW's strftime implementation does not work and cannot be used to
determine the time zone. Besides that, the string operations are
actually unnecessary since we can get the offset from
std::localtime.

Compare localtime to gmtime to find the zone offset on all platforms.
2023-07-10 17:51:34 -04:00
lat9nq 1255196731 settings: Catch runtime error from STL
This function throws a runtime error we can catch on old Windows 10
installs, so we can catch it here rather than disable this path for
everybody.
2023-07-09 02:26:58 -04:00
lat9nq 302a735135 settings: Disable C++20 path on MSVC
Even though it compiles and runs fine on the latest Windows versions,
older LTSC builds will crash due to lacking support somewhere in the OS.

For now just disable it for MSVC until either Microsoft fixes this or we
no longer support 1809 LTSC.
2023-07-05 15:58:12 -04:00
Kelebek1 f1cfd9c219 Fix ScratchBuffer moves 2023-07-04 16:02:58 +01:00
Kelebek1 6f7cb69c94 Use spans over guest memory where possible instead of copying data. 2023-07-02 23:09:48 +01:00
liamwhite 971b89b979
Merge pull request #10970 from Morph1984/thing
general: Misc changes that did not deserve their own PRs
2023-07-01 22:38:18 -04:00
liamwhite 595d55d485
Merge pull request #10950 from german77/mouse_tune
input_common: Tune mouse controls
2023-07-01 22:38:01 -04:00
comex 98685d48e3 Merge remote-tracking branch 'origin/master' into ssl 2023-07-01 15:01:11 -07:00
Morph fbd85417ff ring_buffer: Fix const usage on std::span 2023-06-30 13:33:14 -04:00
Morph b8c906f9d1 scratch_buffer: Add member types to ScratchBuffer
Allows for implicit conversion to std::span<T>.
2023-06-30 13:33:13 -04:00
liamwhite 5e70db0d43
Merge pull request #10935 from Morph1984/mwaitx
x64: Make use of monitorx instructions for power efficient sleeps (AMD)
2023-06-29 10:01:26 -04:00
Narr the Reg 3f407417c1 input_common: Tune mouse controls 2023-06-28 21:04:33 -06:00
german77 df9685a21c input_common: Remove duplicated DriverResult enum 2023-06-28 09:49:47 -06:00
Morph 295fc7d0f8 x64: cpu_wait: Implement MWAITX for non-MSVC compilers 2023-06-28 01:39:15 -04:00
Morph 2b68a3cbbf x64: cpu_wait: Remove magic values 2023-06-28 01:39:06 -04:00
Morph 3d868baaa4 x64: cpu_wait: Make use of MWAITX in MicroSleep
MWAITX is equivalent to UMWAIT on Intel's Alder Lake CPUs.
We can emulate TPAUSE by using MONITORX in conjunction with MWAITX to wait for 100K cycles.
2023-06-28 01:38:55 -04:00
Morph 4303ed614d x64: Add detection of monitorx instructions
monitorx introduces 2 instructions: MONITORX and MWAITX.
2023-06-28 01:36:06 -04:00
lat9nq 21675c9b68 settings: Clean up includes
Adds <version> since we are looking at C++ implementation version
details. Also moves exception header includes into the if preprocessor
command since we only use it there.
2023-06-27 19:13:54 -04:00