Commit Graph

1967 Commits

Author SHA1 Message Date
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
c97cbd089b settings_setting: Fix MSVC error 2023-07-21 10:56:55 -04:00
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
a0883526d6 settings: Delete cpu_accuracy_first_time
Almost a 2 year old migration setting now
2023-07-21 10:56:54 -04:00
27e53990ed settings: Document BasicSetting, add Ranged 2023-07-21 10:56:54 -04:00
b4f2ad3ff5 settings: Move IsConfiguringGlobal to settings_common 2023-07-21 10:56:54 -04:00
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
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
04d4b6ab80 (ui,)settings: Use explicit instantiation
Reduces compile times a tad on clang.
2023-07-21 10:56:54 -04:00
02265f19d9 settings: Remove redundant false literals 2023-07-21 10:56:54 -04:00
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
2fba913d0b settings_enums: Add const type where needed 2023-07-21 10:56:54 -04:00
b86171d2b5 settings: yuzu is not capitalized why is it capitalized stop no bad 2023-07-21 10:56:54 -04:00
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
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
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
d146dd9d12 settings,general: Rename non-confirming enums 2023-07-21 10:56:54 -04:00
3281ea935f settings: Make volume runtime-configurable 2023-07-21 10:56:07 -04:00
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
88d3de4e85 settings: Split enums to new file 2023-07-21 10:56:07 -04:00
4c4bc134a9 settings, uisettings: Initialize linkage counter 2023-07-21 10:56:07 -04:00
8e15146026 configure_system: Implement with for loop 2023-07-21 10:56:07 -04:00
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
464aad52cd settings: Add UiGeneral class 2023-07-21 10:56:07 -04:00
d35577d3ed configuration: Implement slider 2023-07-21 10:56:07 -04:00
3a7a5edcea settings: Define base renderer runtime modifiable settings 2023-07-21 10:56:07 -04:00
a4de202cbd settings: Add anisotropy mode enum 2023-07-21 10:56:07 -04:00
cfb63c68db shared_translation: Finish using int ids 2023-07-21 10:56:07 -04:00
bafd569b47 settings,uisettings: Add IDs to settings 2023-07-21 10:56:07 -04:00
f8435d676f configure_graphics: Partial runtime implementation 2023-07-21 10:56:07 -04:00
75d7e40113 settings: Recategorize a bit
Will help with generating config UI later.
2023-07-21 10:56:07 -04:00
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
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
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
5ccfaf0517 settings: Pool SetGlobal functions 2023-07-21 10:56:07 -04:00
5cffa34288 settings,video_core: Consolidate ASTC decoding options
Just puts them all neatly into one place.
2023-07-21 10:56:07 -04:00
71b3b2a2f0 general: Silence -Wshadow{,-uncaptured-local} warnings
These occur in the latest commits in LLVM Clang.
2023-07-18 19:31:35 -04:00
e0fb1d3d17 ssl: Reorder inclusions 2023-07-17 15:46:24 -04:00
2461c78e3f Merge pull request #10912 from comex/ssl
Implement SSL service
2023-07-16 16:56:47 -04:00
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
63a0a1f826 time_zone: Clean up includes 2023-07-12 03:03:03 -04:00
9e0d6f7d54 time_zone: Swap subtraction order 2023-07-12 03:02:45 -04:00
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
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
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
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
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
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
f1cfd9c219 Fix ScratchBuffer moves 2023-07-04 16:02:58 +01:00
6f7cb69c94 Use spans over guest memory where possible instead of copying data. 2023-07-02 23:09:48 +01:00