Commit graph

97 commits

Author SHA1 Message Date
lat9nq
cce6c6919c common,qt-config: Remove usage of forward_list 2023-07-21 23:09:09 -04:00
lat9nq
9d5bb1f297 configure_system: Use lambda template to group settings 2023-07-21 10:56:55 -04:00
lat9nq
b187a3c214 common,configure_system: Rename method to GetCategory
Fixes essentially a shadowing issue.
2023-07-21 10:56:55 -04:00
lat9nq
245c490e02 settings,configuration: Add a default suffix 2023-07-21 10:56:55 -04:00
lat9nq
380be385d1 configuration: Use paired settings 2023-07-21 10:56:55 -04:00
lat9nq
5700f46f8f shared_widget: Internalize component restoring 2023-07-21 10:56:55 -04:00
lat9nq
da00b5ab3c configuration: Use specialization of settings
Reduces some ugliness in frontend code.
2023-07-21 10:56:55 -04:00
lat9nq
e45389c266 configuration: Use a builder to create widgets
This gets rid of some repeated code and sets us up to send more
information to the new widget.
2023-07-21 10:56:55 -04:00
lat9nq
0a5e03b492 configuration: Move speed_limit to core 2023-07-21 10:56:55 -04:00
lat9nq
859dff4c27 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
d1757cc55e configuration: Use shorter constructor as needed
Reduces some confusion hopefully, since some parameters specified were not
specific to the setting in question.
2023-07-21 10:56:54 -04:00
lat9nq
9be2b39509 FIXME configuration: Avoid unnecessary allocations
ConfigurationShared::Widget needs to be created with a builder. This
would avoid some duplicated code.
2023-07-21 10:56:54 -04:00
lat9nq
cb4cdcbaeb configuration: Document odd widget cases
Explain why we need to do things differently at times, to serve as a
reference.
2023-07-21 10:56:54 -04:00
lat9nq
d35281ddf3 configuration: Use IDs to sort holds 2023-07-21 10:56:07 -04:00
lat9nq
71fe7e39b6 configure_system: Hide locale warn at start 2023-07-21 10:56:07 -04:00
lat9nq
4119adeb56 configuration: Clean up includes a bit 2023-07-21 10:56:07 -04:00
lat9nq
b212eb4d6f configuration: Use a mapping of setting value to name
Makes comboboxes always correspond to the value of the setting they're
modifying.
2023-07-21 10:56:07 -04:00
lat9nq
3b0da07854 shared_widget: Refactor helpers
Makes checkbox creation an option as opposed to a label.
2023-07-21 10:56:07 -04:00
lat9nq
689efc9175 configure_system: Implement with for loop 2023-07-21 10:56:07 -04:00
lat9nq
b527f47bd6 configuration: Add base class to tabs
Tabs that largely configure SwitchableSetting's are now Tabs and grouped
together.
2023-07-21 10:56:07 -04:00
lat9nq
bd8630531e 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
29c66764bb configure_system: Remove external offset on custom rtc 2023-06-05 15:15:11 -04:00
Liam
bdaf10ec9e settings: rename extended memory layout to unsafe, move from general to system 2023-04-30 14:24:22 -04:00
german77
875958163b yuzu: Move audio settings to audio section 2023-03-11 20:04:36 -06:00
german77
d4ce7b7ad6 yuzu: Remove console id setting 2023-03-11 19:33:31 -06:00
german77
8137de5e93 yuzu: Fix language comobox crash 2023-01-22 10:42:59 -06:00
Colin Kinloch
edaac481d1 settings: comment language blocklist columns 2022-12-30 13:51:35 +00:00
Colin Kinloch
e7feff53e7 settings: added regon/language warning bounds check 2022-12-29 15:55:24 +00:00
Colin Kinloch
5de4ef224e settings: warn on invalid regon/language combinations 2022-12-28 20:34:28 +00:00
Chloe Marcec
27a7d5a11a Set: Allow setting device nickname 2022-12-13 19:54:17 -05:00
Andrea Pappacoda
6a2efdda2f chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to b2eb103829
2022-07-27 12:53:49 +02:00
Kyle K
50ea1827aa Update some files with Qt 5.15.2 best practices in mind
There was some discussion about updating to Qt6 and I figured I would
work on some smaller parts. For Windows platform the WinMain function has moved
from the Qt5::WinMain to a new one called Qt6::EntryPointPrivate

Also Qt5 supports versionless CMake targets
https://www.qt.io/blog/versionless-cmake-targets-qt-5.15

These other changes in this commit are to support Qt6, but in ways that don't mess with Qt5.

src/yuzu/bootmanager.cpp: Qt6 complains about not being able to know to use QPoint or QPointF, picking QPoint
src/yuzu/bootmanager.h: Qt6 prefers that QStringList.h be included rather than an empty class definition
src/yuzu/configuration/configure_system.cpp: toULongLong intends to return unsigned 64 bit integer, but
   Settings::values.rng_seed is only 32 bits wide
src/yuzu/game_list.cpp: Qt6 returns a different datatype for QStringList.length than Qt5,
   it used to be int, but in Qt6 its now qsizetype
src/yuzu/loading_screen.cpp: Qt5's for QStyleOption.init say to switch to initFrom.
   The QStyleOption.init doesn't exist in Qt6
src/yuzu/main.cpp: Another QPointer and QStringList.size, lets standardize on size()
2022-05-29 09:21:52 -07:00
ameerj
012963c513 yuzu: Reduce unused includes 2022-03-20 02:25:09 -04:00
ameerj
6cfd975469 settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
2021-10-17 00:37:49 -04:00
Morph
e7364a0165 configuration: Use std::make_unique instead of operator new for ui 2021-10-15 15:26:32 -04:00
Morph
6d0b721351 Merge pull request #6774 from lat9nq/remove-global-yuzu
yuzu qt: Remove global system instances
2021-10-14 14:12:22 -04:00
lat9nq
3aec34df0a yuzu qt: Remove global system instances from config, WaitTree, main 2021-10-07 13:50:13 -04:00
Morph
52fa30ab7d service: Reduce header include overhead 2021-10-07 13:32:21 -04:00
Morph
e8f1d7145e common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)
* common: fs: fs_types: Create filesystem types

Contains various filesystem types used by the Common::FS library

* common: fs: fs_util: Add std::string to std::u8string conversion utility

* common: fs: path_util: Add utlity functions for paths

Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library

* common: fs: file: Rewrite the IOFile implementation

* common: fs: Reimplement Common::FS library using std::filesystem

* common: fs: fs_paths: Add fs_paths to replace common_paths

* common: fs: path_util: Add the rest of the path functions

* common: Remove the previous Common::FS implementation

* general: Remove unused fs includes

* string_util: Remove unused function and include

* nvidia_flags: Migrate to the new Common::FS library

* settings: Migrate to the new Common::FS library

* logging: backend: Migrate to the new Common::FS library

* core: Migrate to the new Common::FS library

* perf_stats: Migrate to the new Common::FS library

* reporter: Migrate to the new Common::FS library

* telemetry_session: Migrate to the new Common::FS library

* key_manager: Migrate to the new Common::FS library

* bis_factory: Migrate to the new Common::FS library

* registered_cache: Migrate to the new Common::FS library

* xts_archive: Migrate to the new Common::FS library

* service: acc: Migrate to the new Common::FS library

* applets/profile: Migrate to the new Common::FS library

* applets/web: Migrate to the new Common::FS library

* service: filesystem: Migrate to the new Common::FS library

* loader: Migrate to the new Common::FS library

* gl_shader_disk_cache: Migrate to the new Common::FS library

* nsight_aftermath_tracker: Migrate to the new Common::FS library

* vulkan_library: Migrate to the new Common::FS library

* configure_debug: Migrate to the new Common::FS library

* game_list_worker: Migrate to the new Common::FS library

* config: Migrate to the new Common::FS library

* configure_filesystem: Migrate to the new Common::FS library

* configure_per_game_addons: Migrate to the new Common::FS library

* configure_profile_manager: Migrate to the new Common::FS library

* configure_ui: Migrate to the new Common::FS library

* input_profiles: Migrate to the new Common::FS library

* yuzu_cmd: config: Migrate to the new Common::FS library

* yuzu_cmd: Migrate to the new Common::FS library

* vfs_real: Migrate to the new Common::FS library

* vfs: Migrate to the new Common::FS library

* vfs_libzip: Migrate to the new Common::FS library

* service: bcat: Migrate to the new Common::FS library

* yuzu: main: Migrate to the new Common::FS library

* vfs_real: Delete the contents of an existing file in CreateFile

Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.

* input_profiles: Don't iterate the input profile dir if it does not exist

Silences an error produced in the log if the directory does not exist.

* game_list_worker: Skip parsing file if the returned VfsFile is nullptr

Prevents crashes in GetLoader when the virtual file is nullptr

* common: fs: Validate paths for path length

* service: filesystem: Open the mod load directory as read only
2021-05-25 19:32:56 -04:00
lat9nq
d6c9f6acc5 general: Demote custom_rtc to regular setting 2021-05-17 15:54:30 -04:00
lat9nq
04060711c2 configuration: Add CPU tab to game properties
Allows setting CPU accuracy to Accurate or Unsafe per-game, as well as
the accuracy options for Unsafe. Debug is not allowed here as a per-game
CPU accuracy.
2021-05-16 01:31:42 -04:00
lat9nq
4158f88b49 configuration: Simplify applying per-game settings
Originally, every time we add a per-game setting, we'd have to guard for
it when setting it on the global config, and use a specific function to
do it for the per-game config.

This moves the global check into the ApplyPerGameSetting function so
that we can use it for changing both the global and per-game states.
Less work for the programmer.
2021-05-15 22:59:38 -04:00
bunnei
7a76bc30fa common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
Lioncash
c06510376a core: Eliminate remaining usages of the global system instance
Removes all remaining usages of the global system instance. After this,
migration can begin to migrate to being constructed and managed entirely
by the various frontends.
2020-11-27 11:40:45 -05:00
Lioncash
b1de33af75 core/settings: Move configuring_global behind an API
Rather than have directly modified global state here, we can make it an
implementation detail and have an interface that changes are queried
through.
2020-11-04 04:16:37 -05:00
bunnei
3fb8109c94 service: time: Update current time with changes to RTC setting.
- This can be used to advance time, e.g. for Pokemon Sword/Shield pokejobs.
2020-10-12 18:09:15 -07:00
Lioncash
f6ff8a0235 configuration_shared: Simplify name lookup in highlighting functions
We can query the given object name directly from the widget itself. This
removes any potential for forgetting to change the name if the widget
gets renamed and makes the API much simpler (just pass in the widget,
and not worry about its name).
2020-08-14 14:17:02 -04:00
lat9nq
932de8986b configuration: Use forward declares and remove extraneous structs 2020-07-19 13:26:55 -04:00
lat9nq
d26e1a1839 clang-format 2020-07-19 13:26:55 -04:00
lat9nq
3676efbf03 configuration_shared: Break up tracker structs to respective classes
One less global variable.
2020-07-19 13:26:55 -04:00