Commit graph

69 commits

Author SHA1 Message Date
GPUCode cf9bb90ae3
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible

* code: Prefix memcpy and memcmp with std::
2023-07-07 01:52:40 +03:00
Tobias cb82ffbe20
code: Small cleanups and fixes to lambda captures (#6191)
Co-authored-by: v1993 <v19930312@gmail.com>
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2022-12-17 16:04:10 +01:00
GPUCode 48ee112ceb
Add per game configuration options (#6187)
* common: Move settings to common from core.

- Removes a dependency on core and input_common from common.

* code: Wrap settings values

* Port from yuzu to allow per game settings

* citra_qt: Initial per-game settings dialog

* citra_qt: Use new API for read/save of config values

* citra_qt: Per game audio settings

* citra_qt: Per game graphics settings

* citra_qt: Per game system settings

* citra_qt: Per game general settings

* citra_qt: Document and run clang format

* citra_qt: Make icon smaller and centered

* citra_qt: Remove version number

* Not sure how to extract that, can always add it back later

* citra_qt: Wrap UISettings

* citra_qt: Fix unthottled fps setting

* citra_qt: Remove margin in emulation tab

* citra_qt: Implement some suggestions

* Bring back speed switch hotkey

* Allow configuration when game is running

* Rename/adjust UI stuff

* citra_qt: Fix build with separate windows

* citra_qt: Address feedback

* citra_qt: Log per-game settings before launching games

* citra_qt: Add shader cache options

* Also fix android build

* citra_qt: Add DLC menu option

* citra_qt: Run clang-format

* citra_qt: Adjust for time offset

* citra_qt: Implement suggestions

* Run clang-format

Co-authored-by: bunnei <bunneidev@gmail.com>
2022-12-08 13:27:25 +02:00
Kyle Kienapfel 854fe203e8 Qt: Retranslate GameList header and Filter line
Didn't notice this until I was trying to change the default font
to Comic Sans MS when language is set to English in yuzu.
2022-09-07 13:08:18 +02:00
Kyle K ed0e9e9593 ui: Fix Game Compatibility list translations
Reported by GillianMC on Discord. Looks to be a small quirk in the QT API.

setText(QObject::tr(status.text));
bringing up QObject breaks the link with the GameListItemCompat
2022-09-07 13:08:05 +02:00
Lioncash fdf0825369 game_list_p: Resolve deprecated usage of QVariant operator<
This is designated as obsolete in Qt's docs (see:
https://doc.qt.io/qt-5/qvariant-obsolete.html#operator-lt)
2020-12-19 18:48:38 +01:00
FearlessTobi e12ee55faa qt/game_list: Give GameListSearchField::KeyReleaseEater a parent
This fixes a memory leak as KeyReleaseEater's destructor was never
called.

Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2020-10-04 05:14:49 +02:00
FearlessTobi 84c42bf581 game_list_p: Mark some constants as constexpr
Consistency change with how we mark constants in the rest of the
codebase.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-09-09 17:06:15 +02:00
Vitor Kiguchi 950c032837 change gameListDir to hold an index instead of a raw pointer 2020-05-09 23:36:40 -03:00
Vitor Kiguchi d7f6cc3951 game_list_p.h: Specify the context for tr 2020-02-29 20:29:36 -03:00
James Rowe 15ed600c91
Merge pull request #4956 from vitor-k/game-sorting
Fixes to game list sorting
2019-11-20 09:48:08 -07:00
Weiyi Wang 6d0189b4b1
Merge pull request #4992 from FearlessTobi/port-2513
yuzu/game_list&multiplayer: Specify string conversions explicitly
2019-11-20 10:45:21 -05:00
FearlessTobi 9c1535621a citra_qt/game_list: Specify string conversions explicitly 2019-11-09 02:46:23 +01:00
FearlessTobi 5e98835b5f yuzu/game_list: Silence -Wswitch
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2019-11-02 18:56:23 +01:00
vitor-k cc9bcf3e48 fix uppercase sorting 2019-10-25 18:49:13 -03:00
vitor-k 476dcb1915 Use the displayed text for sorting GameListItemPath.
By default, DisplayRole is used as the SortRole.
This behaviour is what's expected by the user.
Made it so that an access to SortRole is equivalent to one to DisplayRole.
Also fixes a bug with directory sorting.
2019-09-28 00:48:11 -03:00
FearlessTobi 029cc77c4b Backport changes from yuzu-emu/yuzu#2444 2019-09-22 17:27:01 +02:00
vitor-k 966d128025 Remove newlines from the long title in row2 2019-09-09 23:40:32 -03:00
vitor-k 1f1ac98f10 Fix clang format for long-title 2019-09-09 23:36:21 -03:00
vitor-k f9cded05fd Allow displaying of the full title in the interface, as well as use the full title in the search filter 2019-09-09 23:36:21 -03:00
zhupengfei 531bf857f5
Remove old region free logic 2019-08-20 21:03:41 +08:00
zhupengfei 4144f4480d
citra_qt: Add single line mode for game list
This single line mode is aimed at restoring the intended behavior with Small or None icons. Line breaks will be replaced with commas (Region row) or spaces (Name row). One can toggle this option in UI configuration.
2019-08-20 20:03:15 +08:00
zhupengfei 82fea86717
citra_qt/game_list: Add an All Regions check
Some titles (mostly homebrews) do not use the region free value 0x7FFF but instead set all of the region flags, resulting in all regions displayed in game list, which is not beautiful and not what we want. This fixes it by adding an all_regions check.
2019-08-20 19:57:33 +08:00
James Rowe 7fe9a094a5 Remove qt5_wrap_ui macro usage 2019-08-16 19:35:37 -06:00
B3n30 e454f4c05b proper translation part2 2019-08-11 16:51:46 +02:00
B3n30 ec4fb81c4b proper translation 2019-08-11 16:22:43 +02:00
B3n30 69b32f174c clang-format 2019-08-11 14:44:31 +02:00
B3n30 848bfaf8cb Dispaly all valid game regions 2019-08-11 13:52:08 +02:00
Lioncash 564032307d CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt target
This is a compile definition introduced in Qt 4.8 for reducing the total
potential number of strings created when performing string
concatenation. This allows for less memory churn.

This can be read about here:
https://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/

For a change that isn't source-compatible, we only had one occurrence
that actually need to have its type clarified, which is pretty good, as
far as transitioning goes.
2019-05-01 14:26:13 +02:00
Lioncash f56a840333 game_list_p: Take map iterator contents by const reference
We don't need to copy the whole struct in this instance, we can just
utilize a reference instead.
2018-10-20 16:31:35 +02:00
Lioncash 52ec85be12 game_list_p: Amend typo in GameListItemCompat's constructor parameter
Adds a missing 'i' character that was missing in compatibility.
2018-10-20 16:31:35 +02:00
Lioncash 230edc8c7c yuzu: Move compatibility list specifics to their own source files
Lets us keep the generic portions of the compatibility list code
together, and allows us to introduce a type alias that makes it so we
don't need to type out a very long type declaration anymore, making the
immediate readability of some code better.
2018-10-20 16:31:35 +02:00
lioncash 9238015dd4 yuzu: Move GameListWorker to its own source files
This has gotten sufficiently large enough to warrant moving it to its
own source files. Especially given it dumps the file_sys headers around
code that doesn't use it for the most part.

This'll also make it easier to introduce a type alias for the
compatibility list, so a large unordered_map type declaration doesn't
need to be specified all the time (we don't want to propagate the
game_list_p.h include via the main game_list.h header).
2018-10-20 16:31:35 +02:00
zhupengfei 8ecd31db41
citra_qt: use enum classes for the settings 2018-10-14 22:55:28 +08:00
zhupengfei 90f9d32f13
citra_qt: Add Game List configuration
This adds a Game List configuration group box which is similar to yuzu's, with features including icon size setting, row 1/2 text, and ability to hide invalid titles (those without a valid SMDH). I also added a UI tab and moved the language and theme settings there.
2018-10-09 22:37:21 +08:00
zhupengfei bbf391abb9
citra_qt, core: game list "Open XXX Location" improvements 2018-10-01 08:42:22 +08:00
Lioncash b3221c3180 file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.

We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
2018-09-22 21:18:56 +02:00
fearlessTobi 2f6f232965 Backport some review fixes of Lioncash 2018-09-01 15:41:46 +02:00
fearlessTobi 1f0cbf43d6 Port #942 from yuzu: "qt: Minor cleanup-related changes" 2018-08-24 17:14:09 +02:00
zhupengfei 11da018ea6
game_list: move SearchField to game_list_p.h and fix untranslated text
I have tested and made sure the text is translatable, but this would require a translation update to take effect.
2018-07-23 21:26:55 +08:00
wwylele 7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
James Rowe c39dee1569
Merge pull request #3617 from BreadFish64/multiple-game-dirs
QT: Add support for multiple game directories
2018-06-17 21:04:24 -06:00
zhupengfei cb52033133
game_list: fix system title display 2018-06-07 18:50:35 +08:00
BreadFish64 1a57f9488f citra_qt: support multiple game directories 2018-05-26 15:38:06 -05:00
zhupengfei 9504aa19d5
game_list: rewrite format 2018-05-26 22:27:59 +08:00
zhupengfei e5c8b9f0a2
game_list: append filename after program ID 2018-05-23 21:36:10 +08:00
zhupengfei 3b18faa163
citra_qt: Improve Game List Item display 2018-05-19 17:21:26 +08:00
FearlessTobi f354744ad4 citra_qt: Refactor game list compatibilty 2018-05-10 03:57:57 +02:00
FearlessTobi 36c4765054 citra_qt: Add a game region column 2018-05-01 19:57:01 +02:00
Jan Beich 394638e9c9 Qt: Add missing #include after 2f8bd18296
In file included from src/citra_qt/citra-qt_autogen/mocs_compilation.cpp:14:
In file included from src/citra_qt/citra-qt_autogen/EWIEGA46WW/moc_game_list_p.cpp:9:
src/citra_qt/game_list_p.h:160:17: error: use of undeclared identifier 'QCoreApplication'; did you mean 'QApplication'?
        setText(QCoreApplication::translate("GameList", status.text));
                ^~~~~~~~~~~~~~~~
                QApplication
/usr/local/include/qt5/QtGui/qwindowdefs.h:81:7: note: 'QApplication' declared here
class QApplication;
      ^
In file included from src/citra_qt/citra-qt_autogen/mocs_compilation.cpp:14:
In file included from src/citra_qt/citra-qt_autogen/EWIEGA46WW/moc_game_list_p.cpp:9:
src/citra_qt/game_list_p.h:160:17: error: incomplete type 'QApplication' named in nested name specifier
        setText(QCoreApplication::translate("GameList", status.text));
                ^~~~~~~~~~~~~~~~~~
/usr/local/include/qt5/QtCore/qobject.h:446:18: note: forward declaration of 'QApplication'
    friend class QApplication;
                 ^
In file included from src/citra_qt/citra-qt_autogen/mocs_compilation.cpp:14:
In file included from src/citra_qt/citra-qt_autogen/EWIEGA46WW/moc_game_list_p.cpp:9:
src/citra_qt/game_list_p.h:161:20: error: use of undeclared identifier 'QCoreApplication'; did you mean 'QApplication'?
        setToolTip(QCoreApplication::translate("GameList", status.tooltip));
                   ^~~~~~~~~~~~~~~~
                   QApplication
/usr/local/include/qt5/QtGui/qwindowdefs.h:81:7: note: 'QApplication' declared here
class QApplication;
      ^
In file included from src/citra_qt/citra-qt_autogen/mocs_compilation.cpp:14:
In file included from src/citra_qt/citra-qt_autogen/EWIEGA46WW/moc_game_list_p.cpp:9:
src/citra_qt/game_list_p.h:161:20: error: incomplete type 'QApplication' named in nested name specifier
        setToolTip(QCoreApplication::translate("GameList", status.tooltip));
                   ^~~~~~~~~~~~~~~~~~
/usr/local/include/qt5/QtCore/qobject.h:446:18: note: forward declaration of 'QApplication'
    friend class QApplication;
                 ^
2018-04-18 20:03:52 +00:00