Commit graph

786 commits

Author SHA1 Message Date
Zach Hilman
45da3be40e main: Add main window integrations for QtWebBrowserApplet 2018-12-28 15:32:39 -05:00
Zach Hilman
e00e1fc755 qt: Implement Qt frontend to web browser
Using a custom reimplementation of QWebEngineView and an injector script.
2018-12-28 15:32:39 -05:00
Lioncash
f80bc712ea kernel: Rename 'default' CPU core to 'ideal' core
This makes the naming more closely match its meaning. It's just a
preferred core, not a required default core. This also makes the usages
of this term consistent across the thread and process implementations.
2018-12-27 21:48:49 -05:00
spycrab
c6da772b24 Qt/Configure: Use sidebar to divide tabs into smaller groups 2018-12-28 01:14:57 +01:00
Zach Hilman
c643f364b4 am: Implement GetSaveDataSize and ExtendSaveData
These functions come in a pair and are needed by Smash Ultimate, Minecraft, and Skyrim, amongst others.
2018-12-27 00:18:00 -05:00
bunnei
17fa0ffff9
Merge pull request #1948 from lioncash/translatable
configure_per_general: Mark UI strings as translatable in the constructor
2018-12-26 20:39:30 -05:00
Lioncash
0c18d47348 configure_per_general: Mark UI strings as translatable in the constructor
These are user-facing strings, so they should be translatable.
2018-12-26 17:45:15 -05:00
Lioncash
faa9110541 configure_input_simple: Make input profile array constexpr
Calling tr() from a file-scope array isn't advisable, since it can be
executed before the Qt libraries are even fully initialized, which can
lead to crashes.

Instead, the translatable strings should be annotated, and the tr()
function should be called at the string's usage site.
2018-12-26 17:36:36 -05:00
bunnei
ae582b6669
Merge pull request #1849 from encounter/svcSetThreadActivity
svc: Implement SetThreadActivity (thread suspension)
2018-12-26 15:54:14 -05:00
Zach Hilman
9c2d83cb9c qt: Use ProfileSelectionDialog when selecting user for save data
This allows us to present a much nicer UI to the user over a simple combo box and is made easy with the modular nature of the profile-selection applet frontend.
2018-12-25 10:52:50 -05:00
Zach Hilman
4d61ac08aa qt: Add setting to prompt for user on game boot
Using the QtProfileSelectorDialog, this implementation is trivial. This mimics the real switch behavior of asking which user on every game boot, but it is default disabled as that might get inconvenient.
2018-12-25 10:42:14 -05:00
bunnei
9a22a94a51
Merge pull request #1886 from FearlessTobi/port-4164
Port citra-emu/citra#4164: "citra_qt, video_core: Screenshot functionality"
2018-12-23 14:36:51 -05:00
bunnei
f95f6c7d86
Merge pull request #1781 from DarkLordZach/applet-profile-select
am: Implement HLE profile selector applet
2018-12-23 14:35:13 -05:00
bunnei
d08bdc861f
Merge pull request #1780 from DarkLordZach/controller-profiles
configure_input: Add Controller Setup Profiles and simplify input UI
2018-12-23 14:34:29 -05:00
David Marcec
fdd649e2ef Fixed uninitialized memory due to missing returns in canary
Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
2018-12-19 12:52:32 +11:00
zhupengfei
a2be49305d yuzu, video_core: Screenshot functionality
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
2018-12-18 22:54:41 +01:00
bunnei
b88430c299
Merge pull request #1902 from lioncash/audio
audio_core: Make g_sink_details internally linked
2018-12-14 21:48:17 -05:00
bunnei
7d39b19edc
Merge pull request #1871 from lioncash/move
yuzu/wait_tree: Pass QString by value and std::move in the initializer list for WaitTreeText
2018-12-14 13:13:32 -05:00
Lioncash
6beb823f15 audio_core: Make g_sink_details internally linked
We can hide the direct array from external view and instead provide
functions to retrieve the necessary info. This has the benefit of
completely hiding the makeup of the SinkDetails structure from the rest
of the code.

Given that this makes the array hidden, we can also make the array
constexpr by altering the members slightly. This gets rid of several
static constructor calls related to std::vector and std::function.

Now we don't have heap allocations here that need to occur before the
program can even enter main(). It also has the benefit of saving a
little bit of heap space, but this doesn't matter too much, since the
savings in that regard are pretty tiny.
2018-12-13 16:44:32 -05:00
bunnei
2c45c6d234
Merge pull request #1819 from DarkLordZach/disable-addons
patch_manager: Add support for disabling patches
2018-12-10 21:52:19 -05:00
bunnei
f85134021f
Merge pull request #1873 from lioncash/const
loaders: Make GetFileType() a const qualified member function
2018-12-07 18:15:30 -05:00
Lioncash
17b4355391 yuzu/wait_tree: Pass QString by value and std::move in the initializer list for WaitTreeText
Just a trivial modernization that potentially avoids copying strings in certain scenarios.
2018-12-05 18:34:03 -05:00
Lioncash
01bf329f63 yuzu/game_list_worker: Don't retrieve the file type twice in AddFstEntriesToGameList()
Similarly, here we can avoid doing unnecessary work twice by retrieving
the file type only once and comparing it against relevant operands,
avoiding potential unnecessary object construction/destruction.
2018-12-05 17:58:15 -05:00
Lioncash
de095ded5c yuzu/game_list_worker: Don't retrieve file type and file type strings twice in MakeGameListEntry()
While GetFileType() is indeed a getter function, that doesn't mean it's
a trivial function, given some case require reading from the data or
constructing other objects in the background. Instead, only do necessary
work once.
2018-12-05 17:49:37 -05:00
Zach Hilman
c07059e7fd configure_input_simple: Properly signal docked mode change 2018-12-05 14:05:57 -05:00
Zach Hilman
233a804196 configure_input: Add ConfigureInputSimple as default input UI config
Greatly simplifies the current input UI, while still allowing power users to tweak advanced settings. Adds 'input profiles', which are easy autoconfigurations to make getting started easy and fast. Also has a custom option which brings up the current, full UI.
2018-12-05 14:02:02 -05:00
Zach Hilman
59ca8d458d configure_input: Convert into QDialog 2018-12-05 14:02:02 -05:00
Zach Hilman
20dffc22a2 configure: Use ConfigureInputSimple for Input tab 2018-12-05 14:02:02 -05:00
Zach Hilman
281b64daf4 ui_settings: Add UI setting for input profile index 2018-12-05 14:02:02 -05:00
Lioncash
e90fa1ac54 configuration/config: Use an intermediary variable for accessing players
Avoids typing the same long accessor just to retrieve player attributes.
2018-12-05 03:41:33 -05:00
bunnei
af286294f9
Merge pull request #1837 from lioncash/map
yuzu/game_list_worker: Minor cleanup and code deduplication
2018-12-04 19:57:41 -05:00
Lioncash
a49fd7fd57 yuzu/game_list_worker: Move std::string construction after the termination check in callbacks
Avoids potentially allocating a std::string instance when it isn't
needed.
2018-12-04 18:39:35 -05:00
Zach Hilman
f6f6503578 qt: Add Properties menu to game list right-click 2018-12-04 13:34:50 -05:00
Luke Street
a3d78b77f8 debugger: Set paused thread color 2018-12-04 02:25:34 -05:00
Lioncash
5eb057f422 kernel/object: Amend handle types to distinguish between readable and writable events
Two kernel object should absolutely never have the same handle ID type.
This can cause incorrect behavior when it comes to retrieving object
types from the handle table. In this case it allows converting a
WritableEvent into a ReadableEvent and vice-versa, which is undefined
behavior, since the object types are not the same.

This also corrects ClearEvent() to check both kernel types like the
kernel itself does.
2018-12-04 02:20:47 -05:00
Luke Street
3e75175d02 svc: Implement SetThreadActivity (thread suspension) 2018-12-04 01:23:50 -05:00
Zach Hilman
e11e65b3d6 applets: Correct event ResetTypes from OneShot to Sticky
Fixes bugs relating to signalling in software keyboard.
2018-12-03 17:27:40 -05:00
Zach Hilman
bf90f2402d qt: Implement GUI dialog frontend for ProfileSelector
Presents profiles in a list, similar to switch.
2018-12-03 17:26:27 -05:00
Zach Hilman
6deccc7e6b qt: Register to use Qt ProfileSelector instead of default 2018-12-03 17:26:27 -05:00
Zach Hilman
60e27252a5 qt: Add UI to display game properties and disable add-ons 2018-12-03 17:21:25 -05:00
Zach Hilman
c381f46428 config: Store and load disabled add-ons list 2018-12-03 17:20:34 -05:00
bunnei
76525013c0
Merge pull request #1842 from lioncash/slot
yuzu/configuration: Minor clean-up related changes
2018-12-03 17:12:01 -05:00
bunnei
f6b22d9251
Merge pull request #1835 from lioncash/cache-global
filesystem: De-globalize registered_cache_union
2018-12-03 17:11:26 -05:00
bunnei
ef69b4b830
Merge pull request #1803 from DarkLordZach/k-able-event
kernel: Divide Event into ReadableEvent and WritableEvent
2018-12-03 17:05:57 -05:00
Frederic Laing
6d7514ccec game_list: Remove a reference of a reference 2018-12-03 19:26:36 +01:00
Lioncash
195cad9635 yuzu/configuration: Make slots private where applicable
These slots are only ever attached to event handling mechanisms within
the class itself, they're never used externally. Because of this, we can
make the functions private.

This also removes redundant usages of the private access specifier.
2018-12-02 14:18:36 -05:00
Lioncash
eabfb7730d yuzu/configuration: Add missing override specifiers to configuration-related classes
Resolves trivial compiler warnings.
2018-12-02 14:18:36 -05:00
Lioncash
f3253d0f14 yuzu/configuration/configure_input: Default destructor in the cpp file
The previous code could potentially be a compilation issue waiting to
occur, given we forward declare the type for a std::unique_ptr. If the
complete definition of the forward declared type isn't visible in a
translation unit that the class is used in, then it would fail to
compile.

Defaulting the destructor in a cpp file ensures the std::unique_ptr's
destructor is only invoked where its complete type is known.
2018-12-02 14:18:26 -05:00
bunnei
a6805e58ce
Merge pull request #1795 from ReinUsesLisp/vc-cleanup
video_core: Minor style changes
2018-12-01 23:46:18 -05:00
Lioncash
db4523f1ec filesystem: De-globalize registered_cache_union
We can just return a new instance of this when it's requested. This only
ever holds pointers to the existing registed caches, so it's not a large
object. Plus, this also gets rid of the need to keep around a separate
member function just to properly clear out the union.

Gets rid of one of five globals in the filesystem code.
2018-12-01 23:43:23 -05:00
Lioncash
8c108eaca7 yuzu/game_list_worker: Deduplicate game list entry creation
Avoids duplicating the same code twice verbatim.
2018-12-01 23:23:39 -05:00
Lioncash
f1ecfcb8bc yuzu/game_list_worker: Tidy up string handling in FillControlMap()
We don't need to call out to our own file handling functions when we're
going to construct a QFileInfo instance right after it. We also don't
need to convert to a std::string again just to compare the file
extension.
2018-12-01 22:49:00 -05:00
Bartosz Kaszubowski
5f07ca3dce remove border from GameList 2018-11-30 23:35:08 +01:00
Lioncash
4b950728fd configure_input: Amend clang-format discrepancies 2018-11-30 03:31:56 -05:00
Zach Hilman
a342bcc9b1 kernel/event: Reference ReadableEvent from WritableEvent 2018-11-29 08:48:40 -05:00
Zach Hilman
ff610103b5 core: Port all current usages of Event to Readable/WritableEvent 2018-11-29 08:45:41 -05:00
bunnei
7befe0134d
Merge pull request #1768 from greggameplayer/patch-2
Uncheck automatically joycons docked when docked mode is enable
2018-11-29 01:00:09 -05:00
ReinUsesLisp
22c7c710b4 gl_rasterizer: Remove extension booleans 2018-11-28 21:18:13 -03:00
bunnei
adb882bf90
Merge pull request #1814 from lioncash/ptr
file_sys/registered_cache: Use regular const references instead of std::shared_ptr for InstallEntry()
2018-11-27 19:20:12 -05:00
Lioncash
2a22c1b27e yuzu/configure_input_player: Use std::size_t to represent the player index instead of u8
Prevents compiler warnings related to truncation when invoking the
dialog. It's also extremely suspect to use a u8 value here instead of a
more general type to begin with.
2018-11-27 16:37:21 -05:00
Lioncash
0782d3971b yuzu/configure_input: Make CallConfigureDialog a non-member template function
This doesn't depend on any part of the private interface, so it can be
made a non-member internal function.
2018-11-27 16:37:18 -05:00
Lioncash
d72c809030 file_sys/registered_cache: Use regular const references instead of std::shared_ptr for InstallEntry()
These parameters don't need to utilize a shared lifecycle directly in
the interface. Instead, the caller should provide a regular reference
for the function to use. This also allows the type system to flag
attempts to pass nullptr and makes it more generic, since it can now be
used in contexts where a shared_ptr isn't being used (in other words, we
don't constrain the usage of the interface to a particular mode of
memory management).
2018-11-27 16:33:14 -05:00
Lioncash
11cf13a6e1 yuzu/configure_input_player: Use a lambda expression instead of std::bind
std::bind is the pre-C++11 way of doing this.
2018-11-27 05:08:13 -05:00
Lioncash
73a48d6523 yuzu/configure_input_player: Amend constructor initializer list order
Orders the elements the way they would actually be initialized in.
Resolves compiler warnings with gcc and clang
2018-11-27 05:04:51 -05:00
Lioncash
53bff53791 yuzu/configure_input: Remove unused function MoveGridElement 2018-11-27 05:03:26 -05:00
Lioncash
d67e88e59c yuzu/configure_input*: Move data members after function declarations
The common pattern is to put the data members after the function
interface where applicable.
2018-11-27 05:02:15 -05:00
Lioncash
ec7ea4ae96 yuzu/configure_input: Remove unnecessary includes 2018-11-27 05:00:56 -05:00
bunnei
d01bf170c4
Merge pull request #1725 from FernandoS27/gl43
Update OpenGL's backend version from 3.3 to 4.3
2018-11-23 23:56:57 -05:00
bunnei
e65966bcfc
Merge pull request #1708 from ogniK5377/res-scale
Report resolution scaling support for vi and am
2018-11-23 23:32:19 -05:00
bunnei
67ff974387
Merge pull request #1747 from DarkLordZach/exefs-lfs
patch_manager: Add support for applying LayeredFS patches to ExeFS
2018-11-23 23:31:48 -05:00
greggameplayer
c14af2f71d
correct clang-format 2018-11-22 18:26:43 +01:00
greggameplayer
6d2adb0bc0
Automatically disable joycons docked
when docked mode is enable
2018-11-22 01:24:39 +01:00
FernandoS27
0368260c99 Removed pre 4.3 ARB extensions 2018-11-21 11:43:17 -04:00
FernandoS27
377c60645c Update OpenGL's backend version from 3.3 to 4.3 2018-11-21 11:43:17 -04:00
Zach Hilman
54e74b3572 patch_manager: Show LayeredExeFS patch in add-ons column
The decision was made to name them LayeredExeFS instead of just LayeredFS to differentiate from normal RomFS-based mods. The name may be long/unweildy, but conveys the meaning well.
2018-11-20 19:22:34 -05:00
Zach Hilman
17d8e25cbf settings: Add option to dump ExeFS of games upon launch
When enabled, all exefs(es) will be copied to yuzu/dump/<title_id>/exefs.
2018-11-20 17:49:09 -05:00
Lioncash
4dcdd3a837 yuzu/applets/software_keyboard: Override accept() and reject() instead of providing own differently named member functions
Uses Qt's built-in interface instead of rolling our own separate one on
top of it. This also fixes a bug in reject() where we were calling
accept() instead of reject().
2018-11-20 11:36:50 -05:00
Lioncash
3fa2b218ac yuzu/applets/software_keyboard: std::move std::function instances where applicable
std::function instances can potentially allocate. std::moveing them
prevents an avoidable allocation in that case.
2018-11-20 11:34:19 -05:00
Lioncash
fe2609cb77 yuzu/applets/software_keyboard: Make slots private functions
These aren't required to be public.
2018-11-20 11:29:22 -05:00
bunnei
b6d2c64f4d
Merge pull request #1667 from DarkLordZach/swkbd
am: Implement HLE software keyboard applet
2018-11-20 08:24:11 -08:00
Zach Hilman
aef0d88165 configure_input: Use Joycons Docked instead of Connected as label 2018-11-18 23:22:36 -05:00
Zach Hilman
312ef596a5 configure_input_player: Set minimum width on controls 2018-11-18 23:22:36 -05:00
Zach Hilman
dd92db3fb0 configure_input: Properly update UI components on removal of player 2018-11-18 23:22:36 -05:00
Zach Hilman
e58c951a59 configure_input: Make None a controller option instead of checkbox 2018-11-18 23:22:36 -05:00
Zach Hilman
3a6cd5b3c8 hid: Use player-defined controller type as PREFERRED_CONTROLLER 2018-11-18 23:22:36 -05:00
Zach Hilman
3d1a221893 qt: Move controller button config to separate dialog
Handles button configuration for all controller layouts and debug pads. Configurable at construction.
2018-11-18 23:22:36 -05:00
Zach Hilman
afe8df5020 qt: Add UI to configure touchscreen parameters
This allows adjusting the finger, diameter, and angle of the emulated touchscreen. It also provides a warning to the user about what changing these parameters can do.
2018-11-18 23:22:36 -05:00
Zach Hilman
2e1dd9c649 qt: Add UI to configure mouse buttons
Supports setting the five mouse buttons to any valid controller button/keyboard key (Left, Right, Middle, Foward, Back)
2018-11-18 23:22:36 -05:00
Zach Hilman
f1aec256d7 configure_input: Add support for multiplayer and controller types
This moves the actual button configuration to a separate dialog and only has the enabled and type controls in the tab.
2018-11-18 23:22:36 -05:00
Zach Hilman
d1b7c65b9e yuzu/config: Add (de-)serialization for multiplayer
Defaults to full keyboard for keyboard -- It did not seem to be necessary to make the keyboard configurable (besides enabled/disabled).
2018-11-18 23:22:36 -05:00
bunnei
3e93c30630
Merge pull request #1640 from DarkLordZach/game-list-reload
game_list: Only reload game list after relevant settings changed
2018-11-18 19:24:53 -08:00
Zach Hilman
56cf5b7b17 software_keyboard: Add max and current length display to dialog 2018-11-18 10:53:47 -05:00
Zach Hilman
19b2571aec applet: Add operation completed callback 2018-11-18 10:53:47 -05:00
Zach Hilman
8b433beff3 software_keyboard: Make GetText asynchronous
a
2018-11-18 10:53:47 -05:00
Zach Hilman
7cfb29de23 am: Allow applets to push multiple and different channels of data 2018-11-18 10:53:47 -05:00
Zach Hilman
fed6ab14c3 am: Implement text check software keyboard mode
Allows the game to verify and send a message to the frontend.
2018-11-18 10:53:47 -05:00
Zach Hilman
e696ed1f4d am: Deglobalize software keyboard applet 2018-11-18 10:53:47 -05:00
Zach Hilman
a81645400f qt/main: Register Qt Software Keyboard frontend with AM
Allows using Qt provider over default.
2018-11-18 10:53:47 -05:00
Zach Hilman
5454494adb qt/applets: Provide Qt frontend implementation of software keyboard
Implements all of the features of the keyboard, including length, default text, character validation, and UTF-16 character support.
2018-11-18 10:53:47 -05:00
bunnei
0072275d25
Merge pull request #1678 from FearlessTobi/amiibo-hotkeys
Port citra-emu/citra#4387: "yuzu: Add hotkey for Amiibo loading"
2018-11-16 20:20:41 -08:00
bunnei
5b8f70ea2e
Merge pull request #1632 from DarkLordZach/keys-manager-optimizations
game_list: Optimize game list refresh
2018-11-16 07:02:37 -08:00
David Marcec
4476fd29d6 Fixed switching operation modes when not running a game
The service manager seems to be a nullptr before a game boots
2018-11-16 20:08:02 +11:00
David Marcec
9359655712 Report resolution scaling support for vi and am
Specifying an internal resolution in yuzu now will report the scaled changes to vi and am.
2018-11-16 18:07:42 +11:00
bunnei
97605e36f7
Merge pull request #1618 from DarkLordZach/dump-nso
patch_manager: Add support for dumping uncompressed NSOs
2018-11-15 14:46:10 -08:00
Lioncash
e6676afa18 yuzu/configure_system: Mark the entropy mask string as nontranslatable
There's no need for translators to concern themselves with the
validation mask used by the entry field.
2018-11-14 14:53:43 -05:00
bunnei
e1ea8cc721
Merge pull request #1679 from DarkLordZach/deterministic-rng-2
svc: Use proper random entropy generation algorithm
2018-11-14 11:52:27 -08:00
Zach Hilman
6001af2b89 qt: Move Open yuzu Folder action from Help to File 2018-11-13 17:17:47 -05:00
Zach Hilman
ab552e4a25 svc: Use proper random entropy generation algorithm 2018-11-13 12:26:03 -05:00
fearlessTobi
9ea8eb6b2e yuzu: Add hotkey for Amiibo loading 2018-11-13 15:10:39 +01:00
bunnei
7f3c2525e6
Merge pull request #1670 from DarkLordZach/deterministic-rng
csrng: Add config option to set RNG seed
2018-11-12 21:10:08 -08:00
Zach Hilman
cb1e63ef09 svc: Return random seed for svcGetInfo RandomEntropy 2018-11-12 21:46:21 -05:00
bunnei
d08b876c9d
Merge pull request #1650 from FreddyFunk/cast
yuzu/main: Fix compiler warning
2018-11-12 18:32:54 -08:00
James Rowe
b4a6ce02ce
Merge pull request #1674 from FearlessTobi/fullscreen-fix
yuzu: Add a missing "!" to fix the stuck-in-fullscreen bug
2018-11-12 13:00:25 -07:00
Tobias
9333ee29ca
yuzu: Add a missing "!" to fix the stuck-in-fullscreen bug 2018-11-12 20:57:15 +01:00
Zach Hilman
2a16fd7ffc settings: Add config option to set RNG seed 2018-11-11 23:09:46 -05:00
bunnei
7474382266
Merge pull request #1652 from FreddyFunk/static-cast
configure_system: Fix compiler warning
2018-11-11 12:19:03 -08:00
David Marcec
40db288a2a Renamed CheckIfOperationChanged to OnDockedModeChanged 2018-11-08 12:12:00 +11:00
David Marcec
fd1ef25257 Fixups 2018-11-07 20:12:27 +11:00
David Marcec
41e99d8880 Ability to switch between docked and undocked mode in-game
Started implementation of the AM message queue mainly used in state getters. Added the ability to switch docked mode whilst in game without stopping emulation. Also removed some things which shouldn't be labelled as stubs as they're implemented correctly
2018-11-07 18:01:33 +11:00
Frederic Laing
d34d0bfc87 configure_system: Fix compiler warning 2018-11-06 16:38:10 +01:00
Frederic Laing
6c8b788d32 yuzu/main: Fix compiler warning 2018-11-06 15:22:24 +01:00
bunnei
e10483a878
Merge pull request #1441 from CarlKenner/DebuggerLog
logging: Add DebuggerBackend for logging to Visual Studio
2018-11-05 00:19:59 -05:00
bunnei
acdc770cfb
Merge pull request #1639 from DarkLordZach/open-yuzu-folder
qt: Add help option to open yuzu folder
2018-11-05 00:19:15 -05:00
bunnei
38c1c500ab
Merge pull request #1625 from FernandoS27/astc
Implement ASTC Textures 5x5 and fix a bunch of ASTC texture problems
2018-11-04 18:47:26 -05:00
Dharmin K Shah
b2647dba33
Fix quickstart link 2018-11-05 00:36:49 +05:30
Zach Hilman
52e7e8eed3 game_list: Only reload game list after relevant settings changed
Prevents unnecessary reloads on every configuration operation.
2018-11-03 20:38:39 -04:00
Zach Hilman
97187b7ef6 qt: Add help option to open yuzu folder
Opens a new file manager window at the UserDir.
2018-11-03 12:48:34 -04:00
Zach Hilman
2d2ef05d8c game_list: Make add-ons column optional
As the add-ons column takes the most processing time out of any (as it needs to search registration for updates/dlc, patch control NCAs, search for mods, etc.), an option was added to disable it. This does not affect the application of add-ons. In large game collections, this decreases game list refresh time by as much as 70%.
2018-11-01 20:27:12 -04:00
FernandoS27
60a184455c Fix ASTC Decompressor to support depth parameter 2018-11-01 19:22:12 -04:00
bunnei
1069eced84
Merge pull request #1615 from lioncash/input
configure_system: Contrain profile usernames to 32 characters
2018-11-01 19:10:26 -04:00
FernandoS27
aee93f98f9 Fix ASTC formats 2018-11-01 13:08:19 -04:00
bunnei
d08457f879
Merge pull request #1604 from FearlessTobi/port-4369
Port citra-emu/citra#4369: "compatdb: Use a seperate endpoint for testcase submission"
2018-10-31 22:37:07 -04:00
Lioncash
a6830e61b8 configure_system: Contrain profile usernames to 32 characters
Previously, we would let a user enter an unbounded name and then
silently truncate away characters that went over the 32-character limit.
This is kind of bad from the UX point of view, because we're essentially
not doing what the user intended in certain scenarios.

Instead, we clamp it to 32 characters and make that visually apparent in
the dialog box to provide a name for a user.
2018-10-31 02:05:00 -04:00
bunnei
da5fcbf501
Merge pull request #1624 from lioncash/boost
general: Remove unused boost inclusions where applicable
2018-10-30 13:13:39 -04:00
bunnei
c31412c433
Merge pull request #1595 from FreddyFunk/cast
configure_system: Fix compiler warning
2018-10-30 00:27:41 -04:00
Lioncash
352b56367c general: Remove unused boost inclusions where applicable
Cleans up unused includes and trims off some dependencies on externals.
2018-10-30 00:09:46 -04:00
Frederic L
7a5eda5914 global: Use std::optional instead of boost::optional (#1578)
* get rid of boost::optional

* Remove optional references

* Use std::reference_wrapper for optional references

* Fix clang format

* Fix clang format part 2

* Adressed feedback

* Fix clang format and MacOS build
2018-10-30 00:03:25 -04:00
Zach Hilman
48eb3742b9 settings: Add setting to control NSO dumping
Also adds UI option in Debug > Dump section, with the idea later things to be dumped (i.e. other game data or textures, etc) will use the same group box.
2018-10-29 16:09:08 -04:00
Frederic Laing
f50f065c31 configure_system: Fix compiler warning 2018-10-28 21:13:09 +01:00
fearlessTobi
585b6a6a50 compatdb: Use a seperate endpoint for testcase submission 2018-10-28 13:23:02 +01:00
Lioncash
9024cbb5b8 configure_system: Make GetIcon() return the scaled 64x64 icon
Avoids the need to put the scaling parameters all over the place for the
common case. The only other time scaling is done is to generate the
smaller 48x48 image, so this is fine.
2018-10-27 01:05:56 -04:00
Lioncash
85ed0af84e configure_system: Move entry formatting for the user account list entries to its own function
Avoids the need to duplicate this all over the place, and makes it
translator-friendly across the board.
2018-10-27 01:05:56 -04:00
Lioncash
8eaf857d06 configure_system: Display errors to the user if file operations fail when setting user images
We should display an error to the user if setting a user image for an
account fails, rather than continuing onwards.
2018-10-27 01:05:50 -04:00
bunnei
debabf1fa6
Merge pull request #1569 from lioncash/amiibo
yuzu/main: Notify user of loading errors with Amiibo data
2018-10-25 22:10:08 -04:00
Lioncash
85285b09b0 configure_system: Make the file selector text translatable
This should be localizable, since it's user-facing text.
2018-10-25 17:27:30 -04:00
Lioncash
5172354e29 configure_system: Make GetAccountUsername() an internal function
We can just make the function accept an arbitrary ProfileManager
reference and operate on that instead of tying the function to the class
itself. This allows us to keep the function internal to the cpp file and
removes the need to forward declare the UUID struct.
2018-10-25 17:27:25 -04:00
Lioncash
bf7da804c5 configure_system: Default initialize member variables
These should be initialized to deterministic values so it's easier to
catch improper behavior, as it'll always be reproducable, instead of
performing uninitialized reads.
2018-10-25 16:52:23 -04:00
Lioncash
8806e69f59 configure_system: Simplify UUID generation call in AddUser()
This is a static function so we can just perform an assignment directly.
2018-10-25 16:50:07 -04:00
Lioncash
a6addb5332 configure_system: Amend function casing 2018-10-25 16:47:09 -04:00
Lioncash
2347e1b8c5 configure_system: Add missing override specifier on the destructor 2018-10-25 16:45:13 -04:00
Lioncash
3c63cecb96 configure_system: Make public slots private
These are only used within this class, so we can make them private to
keep their use contained. This also gets rid of the pre-Qt5 'slot'
identifier, since Qt 5's connection syntax doesn't require a function to
be declared a slot anymore.
2018-10-25 16:43:44 -04:00
bunnei
b43cfe6c02
Merge pull request #1575 from lioncash/qstring
game_list_worker: Use QString's formatting instead of fmt in FormatPatchNameVersions()
2018-10-24 19:39:43 -04:00
bunnei
9aa5c1894e
Merge pull request #1570 from lioncash/optional
profile_manager: Use std::optional instead of boost::optional
2018-10-24 18:11:03 -04:00
bunnei
3a6e76e9b5
Merge pull request #1558 from lioncash/ptr
yuzu/configuration/config: Use a std::unique_ptr for qt_config instead of a raw pointer
2018-10-24 18:07:14 -04:00
bunnei
b723390ab1
Merge pull request #1571 from lioncash/debug-translate
graphic_breakpoints: Correct translation of strings in BreakpointModel's data() function
2018-10-24 17:37:18 -04:00
bunnei
d9590d7dfa
Merge pull request #1568 from lioncash/dir
game_list: Use QFileInfo instead of common's file functions
2018-10-24 17:13:51 -04:00
bunnei
2694b43d3a
Merge pull request #1567 from lioncash/translate
game_list: Make game list column headers translatable
2018-10-24 17:13:08 -04:00
bunnei
e6e17a3fc6
Merge pull request #1566 from lioncash/str
bootmanager: Use QStringLiteral instead of std::string to represent the window title.
2018-10-24 17:12:53 -04:00
Lioncash
1edf8660bc game_list_worker: Use QString's formatting instead of fmt in FormatPatchNameVersions()
Using fmt here requires unnecessary string conversions back into
QString. Instead, we can just use QString's formatting and get the end
result of the formatting operation in the proper type.
2018-10-24 11:27:35 -04:00
Lioncash
4a31f99a02 profile_manager: Use std::optional instead of boost::optional
Now that we can actually use std::optional on macOS, we don't need to
continue using boost::optional here.
2018-10-24 11:06:52 -04:00
Lioncash
030847d5fa graphic_breakpoints: Correct translation of strings in BreakpointModel's data() function
tr() will not function properly on static/global data like this, as the
object is only ever constructed once, so the strings won't translate if
the language is changed without restarting the program, which is
undesirable. Instead we can just turn the map into a plain old function
that maps the values to their equivalent strings. This is also lessens
the memory allocated, since it's only allocating memory for the strings
themselves, and not an encompassing map as well.
2018-10-24 11:01:23 -04:00
Lioncash
bed2d6c425 yuzu/main: Notify user of loading errors with Amiibo data
We shouldn't silently continue if loading failed, since the general
assumption is that no messages showing up implicitly indicates success.
2018-10-24 10:39:31 -04:00
Zach Hilman
e7ac42677b configure_system: Clear current username before overwriting
Prevents bug where old username would remain if the new username was shorter in length.
2018-10-24 09:25:20 -04:00
Lioncash
a1c85b8c55 game_list: Use QFileInfo instead of common's file functions
We can just use the facilities that Qt provides instead of pulling in
stuff from common. While we're at it, we can also simplify the nearby
logging statement's argument by just calling .toStdString()
2018-10-24 08:40:22 -04:00
Lioncash
47f081d513 game_list: Make game list column headers translatable
These are user-facing strings, so they should be marked as translatable
2018-10-24 08:20:35 -04:00
Lioncash
2cbc284c2b bootmanager: Use QStringLiteral instead of std::string to represent the window title
This gets rid of an unnecessary type conversion. We can just use the
regular QStringLiteral to already format the string as the type
setWindowTitle accepts instead of converting from a std::string
instance.
2018-10-24 08:14:26 -04:00
Lioncash
6949f73149
yuzu/configuration/config: Use a std::unique_ptr for qt_config instead of a raw pointer
Same behavior, less code.
2018-10-24 00:24:02 -04:00
Lioncash
6f5bede402
yuzu/configuration/config: Reorganize member variable and function layout
Makes the class layout consistent with the others.
2018-10-23 21:46:49 -04:00
Zach Hilman
bfad41b0c1 profile_manager: Create save data if it doesn't exist on use 2018-10-23 19:31:28 -04:00
Zach Hilman
45f2a2fe29 acc: Fix account UUID duplication error 2018-10-23 19:31:28 -04:00
Zach Hilman
e408bbceed configure_system: Clear selection after user delete 2018-10-23 19:31:28 -04:00
Zach Hilman
702622b8f1 profile_manager: Load user icons, names, and UUIDs from system save 2018-10-23 19:31:28 -04:00
Zach Hilman
466960c8ab qt: Allow user to select emu user on open save data 2018-10-23 19:31:28 -04:00
Zach Hilman
b2a8209c5b qt: Add Profile Manager UI to system settings 2018-10-23 19:31:28 -04:00
Zach Hilman
e7e3d5898e settings: Add users and current_user settings and remove username 2018-10-23 19:31:28 -04:00
David
50e4e81fd3 Added Amiibo support (#1390)
* Fixed conflict with nfp

* Few fixups for nfc

* Conflict 2

* Fixed AttachAvailabilityChangeEvent

* Conflict 3

* Fixed byte padding

* Refactored amiibo to not reside in "System"

* Removed remaining references of nfc from system

* used enum for Nfc GetStateOld

* Added missing newline

* Moved file operations to front end

* Conflict 4

* Amiibos now use structs and added mutexes

* Removed amiibo_path
2018-10-23 19:28:17 -04:00
bunnei
5edb2403c2
Merge pull request #1515 from DarkLordZach/dlc-lfs
patch_manager: Add support for LayeredFS on DLC RomFS
2018-10-23 19:26:57 -04:00
bunnei
fc9d8afead
Merge pull request #1542 from lioncash/project
CMakeLists: Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR
2018-10-23 18:44:08 -04:00
bunnei
e61a62066a
Merge pull request #1540 from lioncash/handle
kernel/process: Make the handle table per-process
2018-10-23 18:43:11 -04:00
bunnei
40c63073a9
Merge pull request #1543 from lioncash/target
CMakeLists: Use target_compile_definitions instead of add_definitions to define YUZU_ENABLE_COMPATIBILITY_REPORTING
2018-10-22 22:50:10 -04:00
Zach Hilman
a279d80a19 qt: Move Reinitialize Keys to Tools menu 2018-10-20 18:04:28 -04:00
Lioncash
c8beb665dc CMakeLists: Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR
This is more localized to what we want to enforce directory-wise with
the project. CMAKE_SOURCE_DIR indicates the root of the source tree, but
this would cause the wrong behavior if someone included yuzu as part of
a larger buildsystem (for whatever reason). Instead, we want to use the
directory where the "project(yuzu)" command was declared as the root
path reference.
2018-10-20 17:36:31 -04:00
Lioncash
98a27b1ec7 CMakeLists: Use target_compile_definitions instead of add_definitions to define YUZU_ENABLE_COMPATIBILITY_REPORTING
Keeps the definition constrained to the yuzu target and prevents
polluting anything else in the same directory (should that ever happen).
It also keeps it consistent with how the USE_DISCORD_PRESENCE definition
is introduced below it.
2018-10-20 17:28:29 -04:00
Lioncash
90a981a03a kernel/process: Make the handle table per-process
In the kernel, there isn't a singular handle table that everything gets
tossed into or used, rather, each process gets its own handle table that
it uses. This currently isn't an issue for us, since we only execute one
process at the moment, but we may as well get this out of the way so
it's not a headache later on.
2018-10-20 16:38:32 -04:00
Zach Hilman
9d0fb0f815 qt: Add support for dumping a DLC Data RomFS 2018-10-17 18:27:29 -04:00
bunnei
ee7c2dbf5a config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation.
- This will be used as a catch-all for slow-but-accurate GPU emulation paths.
2018-10-16 17:02:29 -04:00
bunnei
88b8383da2
Merge pull request #1502 from lioncash/unique
core: Convert shared_ptr instances into unique_ptr instances where applicable for System and Cpu
2018-10-16 11:21:42 -04:00
Lioncash
39ae73b356 file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicable
The data retrieved in these cases are ultimately chiefly owned by either
the RegisteredCache instance itself, or the filesystem factories. Both
these should live throughout the use of their contained data. If they
don't, it should be considered an interface/design issue, and using
shared_ptr instances here would mask that, as the data would always be
prolonged after the main owner's lifetime ended.

This makes the lifetime of the data explicit and makes it harder to
accidentally create cyclic references. It also makes the interface
slightly more flexible than the previous API, as a shared_ptr can be
created from a unique_ptr, but not the other way around, so this allows
for that use-case if it ever becomes necessary in some form.
2018-10-16 09:38:52 -04:00
bunnei
870c18b078
Merge pull request #1487 from lioncash/maybe-unused
yuzu/main: Apply the [[maybe_unused]] attribute to the parameter of SetDiscordEnabled
2018-10-15 21:33:14 -04:00
Lioncash
5484742fda core_cpu: Make Cpu scheduler instances unique_ptrs instead of shared_ptrs 2018-10-15 14:15:56 -04:00
Zach Hilman
720d36ca71 crypto: Various crypto fixes for quickstart guide 2018-10-14 21:57:52 -04:00
bunnei
3203193a67
Merge pull request #1490 from lioncash/boot
yuzu/main: Simplify OnMenuLoadFile()
2018-10-14 14:44:49 -04:00
bunnei
0d2ba0a320
Merge pull request #1491 from lioncash/reference
filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem by reference
2018-10-14 14:42:57 -04:00
FernandoS27
e0ca938b22 Propagate depth and depth_block on modules using decoders 2018-10-13 15:25:18 -04:00
Lioncash
0149162dba filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by reference
Neither of these functions alter the ownership of the provided pointer,
so we can simply make the parameters a reference rather than a direct
shared pointer alias. This way we also disallow passing incorrect memory values like
nullptr.
2018-10-13 11:36:35 -04:00
Lioncash
a4c57436fc yuzu/main: Simplify OnMenuLoadFile()
We can utilize QStringList's join() function to perform all of the
appending in a single function call.

While we're at it, make the extension list a single translatable string
and add a disambiguation comment to explain to translators what %1
actually is.
2018-10-13 10:35:18 -04:00
Lioncash
53a0221484 yuzu/main: Apply the [[maybe_unused]] attribute to the parameter of SetDiscordEnabled()
Depending on whether or not USE_DISCORD_PRESENCE is defined, the "state"
parameter can be used or unused. If USE_DISCORD_PRESENCE is not defined,
the parameter will be considered unused, which can lead to compiler
warnings. So, we can explicitly mark it with [[maybe_unused]] to inform
the compiler that this is intentional.
2018-10-13 10:10:29 -04:00
bunnei
1584fb6b38
Merge pull request #1409 from DarkLordZach/key-derivation
crypto: Add support for full key derivation
2018-10-12 22:55:49 -04:00
bunnei
3ac874c32e
Merge pull request #1464 from lioncash/unique
patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
2018-10-09 22:29:39 -04:00
Lioncash
6636f3ff47 patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
Neither of these functions require the use of shared ownership of the
returned pointer. This makes it more difficult to create reference
cycles with, and makes the interface more generic, as std::shared_ptr
instances can be created from a std::unique_ptr, but the vice-versa
isn't possible. This also alters relevant functions to take NCA
arguments by const reference rather than a const reference to a
std::shared_ptr. These functions don't alter the ownership of the memory
used by the NCA instance, so we can make the interface more generic by
not assuming anything about the type of smart pointer the NCA is
contained within and make it the caller's responsibility to ensure the
supplied NCA is valid.
2018-10-09 14:38:03 -04:00
NeatNit
4f24343f32 implemented touch in Qt and SDL
change TouchToPixelPos to return std::pair<int, int>

static_cast (SDL)

various minor style and code improvements

style - PascalCase for function names

made touch events private

const pointer arg in touch events

make TouchToPixelPos a const member function

did I do this right?

braces on barely-multiline if

remove question comment (confirmed in Discord)

fixed consts

remove unused parameter from TouchEndEvent

DRY - High-DPI scaled touch put in separate function

also fixes a bug where if you start touching (with either mouse or touchscreen) and drag the mouse to the LEFT of the emulator window, the touch point jumps to the RIGHT side of the touchscreen; draggin to above the window would make it jump to the bottom.

implicit conversion from QPoint to QPointF, apparently

I have no idea what const even means but I'll put it here anyway

remove unused or used-once variables

make touch scaling functions const, and put their implementations together

removed unused FingerID parameters

QTouchEvent forward declaration; add comment to TouchBegin that was lost in an edit

better DRY in SDL

To do -> TODO(NeatNit)

remove unused include
2018-10-09 20:26:57 +02:00
Zach Hilman
8bbc12b9c2 qt: Add UI option to configure arguments 2018-10-07 14:32:06 -04:00
Zach Hilman
3ec054643e partition_data_manager: Rename system files for hekate
x
2018-10-07 13:16:23 -04:00
Zach Hilman
8f958b89e7 qt: Add rederive keyset menu option 2018-10-07 13:16:04 -04:00
Zach Hilman
3edafc6802 qt: Add key derivation progress bar on initial setup 2018-10-07 13:15:11 -04:00
bunnei
6e4d2e672d
Merge pull request #1396 from DarkLordZach/packed-updates
loader: Add support for packed updates
2018-10-06 23:58:24 -04:00
bunnei
2c0b0ad50d
Merge pull request #1446 from bunnei/fast_fermi_copy
gl_rasterizer: Implement accelerated Fermi2D copies.
2018-10-06 23:18:52 -04:00
Carl Kenner
f5f6292810 logging: Add DebuggerBackend for logging to Visual Studio 2018-10-07 13:24:04 +10:30
bunnei
2fbb20b2b5 yuzu/yuzu_cmd: Add checks for required extension ARB_copy_image. 2018-10-06 12:06:40 -04:00
zhupengfei
690f326613 citra_qt/configuration: misc input tab improvements
* Added a context menu on the buttons including Clear & Restore Default

* Allow clearing (unsetting) inputs. Added a Clear All button

* Allow restoring a single input to default (instead of all)
2018-10-06 15:43:49 +02:00
Lioncash
efd956e6ff
qt: Update telemetry links
These were pointing to a non-existent webpage.
2018-10-06 03:16:39 -04:00
bunnei
b8b90ce6e6
Merge pull request #1332 from FearlessTobi/port-web-backend
Port web_service from Citra
2018-10-06 02:43:09 -04:00
bunnei
e6ee31a8e9
Merge pull request #1440 from lioncash/array
ui_settings: Place definition of the theme array within the cpp file
2018-10-05 22:54:01 -04:00
bunnei
e51d715700
Merge pull request #1439 from lioncash/thread
kernel/thread: Make all instance variables private
2018-10-05 13:41:54 -04:00
Zach Hilman
38c2ac95af romfs_factory: Extract packed update setter to new function 2018-10-05 08:53:51 -04:00
Zach Hilman
5acaeb04c4 patch_manager: Add support for NSP packed updates
Reads as Update (NSP) in add-ons
2018-10-05 08:48:44 -04:00
Zach Hilman
cf7aba4817 game_list: Add XCI update versioning to game list 2018-10-05 08:47:55 -04:00
Lioncash
30dfd89126 ui_settings: Place definition of the theme array within the cpp file
Placing the array wholesale into the header places a copy of the whole
array into every translation unit that uses the data, which is wasteful.
Particularly given that this array is referenced from three different
translation units.

This also changes the array to contain pairs of const char*, rather than
QString instances. This way, the string data is able to be fixed into
the read-only segment of the program, as well as eliminate static
constructors/heap allocation immediately on program start.
2018-10-04 09:43:51 -04:00
bunnei
f85f2b3728
Merge pull request #1415 from DarkLordZach/ips
file_sys: Add support for loading IPS patches
2018-10-04 09:42:37 -04:00
Lioncash
baed7e1fba kernel/thread: Make all instance variables private
Many of the member variables of the thread class aren't even used
outside of the class itself, so there's no need to make those variables
public. This change follows in the steps of the previous changes that
made other kernel types' members private.

The main motivation behind this is that the Thread class will likely
change in the future as emulation becomes more accurate, and letting
random bits of the emulator access data members of the Thread class
directly makes it a pain to shuffle around and/or modify internals.
Having all data members public like this also makes it difficult to
reason about certain bits of behavior without first verifying what parts
of the core actually use them.

Everything being public also generally follows the tendency for changes
to be introduced in completely different translation units that would
otherwise be better introduced as an addition to the Thread class'
public interface.
2018-10-04 00:14:15 -04:00
bunnei
af672d8abf
Merge pull request #1428 from lioncash/qt
configure_graphics: Make functions internally linked where applicable
2018-10-03 21:38:29 -04:00
bunnei
839dbd9710
Merge pull request #1431 from lioncash/audio
configure_audio: Minor cleanup-related changes
2018-10-03 19:14:22 -04:00
Lioncash
61b144bbf3 configure_input: Make analog mapping strings translatable
These strings are user-facing, so they should be specified as
translatable with tr().
2018-10-02 20:28:45 -04:00
Lioncash
1c7c798e9e configure_audio: Move combo box index setting to their own functions
Keeps the individual behaviors in their own functions, and cleanly
separate. We can also do a little better by converting the relevant IDs
within the core to a QString only once, instead of converting every
string into a std::string.
2018-10-02 20:24:30 -04:00
Lioncash
57e47bae32 configure_audio: Use QString::fromStdString() for converting audio device names
This ensures that the proper codec will always be used no matter what.
It also avoids relying on ASCII conversions.
2018-10-02 19:50:51 -04:00
Lioncash
226dc914b3 configure_audio: Add disambiguation comment for the volume percentage string
Disambiguates what the string represents to help translators more easily
understand what it is that they're translating. While we're at it, we
can move the code to its own function, so that we don't need to specify
the same string twice.
2018-10-02 19:45:12 -04:00
Lioncash
8f5e2a2b83 configure_graphics: Make functions internally linked where applicable
These aren't used outside of this translation unit, so they can be
internally linked.
2018-10-02 19:24:43 -04:00
fearlessTobi
e4daf4bee5 Review comments - part 5 2018-10-02 16:04:10 +02:00
fearlessTobi
ac06105dfe Review comments -part 4 2018-10-02 15:30:49 +02:00
fearlessTobi
aa48468862 Review comments - part 3 2018-10-02 15:30:48 +02:00
fearlessTobi
b4ace6ec6f Address a bunch of review comments 2018-10-02 15:30:48 +02:00
fearlessTobi
4d139943f2 Port web_service from Citra 2018-10-02 15:30:48 +02:00
Zach Hilman
4c2a94fa94 patch_manager: Use strings for patch type instead of enum 2018-10-01 16:02:50 -04:00
bunnei
decc319634
Merge pull request #1403 from DarkLordZach/install-sysnand
qt: Install System TitleTypes to System NAND
2018-09-30 21:08:44 -04:00
Lioncash
cf9d6c6f52 kernel/process: Make data member variables private
Makes the public interface consistent in terms of how accesses are done
on a process object. It also makes it slightly nicer to reason about the
logic of the process class, as we don't want to expose everything to
external code.
2018-09-30 02:30:01 -04:00
bunnei
f7da74d18e
Merge pull request #1360 from FearlessTobi/port-3979
Port citra-emu/citra#3979 game_list: move SearchField to game_list_p.h and fix untranslated text
2018-09-27 17:09:11 -04:00
Zach Hilman
70e86248fd qt: Install System TitleTypes to System NAND
Fixes an issue where installed system archive NCAs would be installed to user NAND and not recognized by games.
2018-09-27 09:20:06 -04:00
Lioncash
f646ca874d yuzu/main: Resolve precedence bug within CalculateRomFSEntrySize()
Ternary operators have a lower precedence than arithmetic operators, so
what was actually occurring here is "return (out + full) ? x : y" which most
definitely isn't intended, given we calculate out recursively above. We
were essentially doing a lot of work for nothing.
2018-09-25 20:06:21 -04:00
Lioncash
cbb146069a yuzu/main: Move functions stored into static std::function instances out of OnGameListDumpRomFS()
This can cause warnings about static constructors, and is also not ideal
performance-wise due to the indirection through std::function. This also
keeps the behavior itself separate from the surrounding code, which can
make it nicer to read, due to the size of the code.
2018-09-25 20:06:21 -04:00
Lioncash
57616f9758 vfs/etc: Append std:: to size_t usages
Given we just recently had a patch backport this from citra, let's try
and keep the convention uniform.
2018-09-25 20:06:21 -04:00
bunnei
7b81e1e525
Merge pull request #1365 from DarkLordZach/lfs
file_sys: Add support for LayeredFS mods
2018-09-25 16:59:44 -04:00
Zach Hilman
b3c2ec362b fsmitm: Cleanup and modernize fsmitm port 2018-09-23 21:50:20 -04:00
Zach Hilman
4f183123f5 game_list: Add Qt SmoothTransformation to picture scaling 2018-09-21 21:34:46 -04:00
Zach Hilman
ba0873d33c qt: Add UI elements for LayeredFS and related tools 2018-09-21 19:53:33 -04:00
zhupengfei
44228ee3ed 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-09-21 18:47:41 +02:00
bunnei
072053ab95
Merge pull request #1371 from lioncash/fwd-arm
arm_interface: Replace kernel vm_manager include with a forward declaration
2018-09-20 23:35:06 -04:00
Lioncash
9b8fc2b689 arm_interface: Replace kernel vm_manager include with a forward declaration
Avoids an unnecessary inclusion and also uncovers three places where
indirect inclusions were relied upon, which allows us to also resolve
those.
2018-09-20 19:35:36 -04:00
Lioncash
e980e90d6e game_list: Handle plurals within setFilterResult() better
Qt provides an overload of tr() that operates on quantities in relation
to pluralization. This also allows the translation to adapt based on the
target language rules better.

For example, the previous code would result in an incorrect translation
for the French language (which doesn't use the pluralized version of
"result" in the case of a total of zero. While in English it's
correct to use the pluralized version of "result", that is, "results"

---

For example:

English: "0 results"

French: "0 résultat" (uses the singular form)

In French, the noun being counted is singular if the quantity is 0 or 1.
In English, on the other hand, if the noun being counted has a quantity
of 0 or N > 1, then the noun is pluralized.

---

For another example in a language that has different counting methods
than the above, consider English and Irish. Irish has a special form of
of a grammatical number called a dual. Which alters how a word is
written when N of something is 2. This won't appear in this case with a
direct number "2", but it would change if we ever used "Two" to refer to
two of something. For example:

English: "Zero results"

Irish: "Toradh ar bith"

English: "One result"

Irish: "Toradh amháin"

English: "Two results"

Irish: "Dhá thorthaí" <- Dual case

Which is an important distinction to make between singular and plural,
because in other situations, "two" on its own would be written as "dó"
in Irish. There's also a few other cases where the order the words are
placed *and* whether or not the plural or singular variant of the word
is used *and* whether or not the word is placed after or between a set
of numbers can vary. Counting in Irish also differs depending on whether or not
you're counting things (like above) or counting people, in which case an
entirely different set of numbers are used.

It's not important for this case, but it's provided as an example as to why one
should never assume the placement of values in text will be like that of
English or other languages. Some languages have very different ways to
represent counting, and breaking up the translated string like this
isn't advisable because it makes it extremely difficult to get right
depending on what language a translator is translating text into due to
the ambiguity of the strings being presented for translation.

In this case a translator would see three fragmented strings on
Transifex (and not necessarily grouped beside one another, but even
then, it would still be annoying to decipher):

- "of"
- "result"
- "results"

There is no way a translator is going to know what those sets of words
are actually used for unless they look at the code to see what is being
done with them (which they shouldn't have to do).
2018-09-20 01:35:50 -04:00
bunnei
076add4ccd
Merge pull request #1326 from FearlessTobi/port-4182
Port #4182 from Citra: "Prefix all size_t with std::"
2018-09-17 09:51:47 -04:00
bunnei
e833301e4c
Merge pull request #1335 from lioncash/copy
game_list_p: Take map iterator contents by const reference
2018-09-17 09:47:54 -04:00
bunnei
08af788a57
Merge pull request #1336 from lioncash/antialias
yuzu/util: Antialias game list compatibility pixmaps
2018-09-17 09:47:34 -04:00
Lioncash
9dbe9d4291 yuzu/util: Antialias game list compatibility pixmaps
We pass a hint to the QPainter instance that we want anti-aliasing on
the compatibility icons, which prevents the circles from looking fairly
jagged, and actually makes them look circular.
2018-09-17 06:01:14 -04:00
Lioncash
13930f0c33 game_list_p: Amend typo in GameListItemCompat's constructor parameter
Adds a missing 'i' character that was missing in compatibility.
2018-09-17 05:31:30 -04:00
Lioncash
51b5619079 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-09-17 05:30:11 -04:00
fearlessTobi
63c2e32e20 Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
Lioncash
2ea45fe75b kernel/thread: Include thread-related enums within the kernel namespace
Previously, these were sitting outside of the Kernel namespace, which
doesn't really make sense, given they're related to the Thread class
which is within the Kernel namespace.
2018-09-13 16:05:57 -04:00
ReinUsesLisp
a42376dfad Use ARB_multi_bind for uniform buffers (#1287)
* gl_rasterizer: use ARB_multi_bind for uniform buffers

* address feedback
2018-09-12 20:27:43 -04:00
bunnei
938aa5779c
Merge pull request #1302 from lioncash/config
yuzu/configure_gamelist: Mark combo-box strings as translatable
2018-09-12 18:24:11 -04:00
bunnei
926dd41587
Merge pull request #1163 from FearlessTobi/add-audio-stretching
audio_core: Add audio stretching support
2018-09-12 18:23:54 -04:00
Lioncash
e89c22c147 yuzu/configure_gamelist: Make combo box strings translatable
Given these are shown to the user, they should be translatable.

While we're at it, also set up the dialog to automatically retranslate
the dialog along with the combo boxes if it receives a LanguageChange
event.
2018-09-12 02:34:53 -04:00
Lioncash
a9b953e6d4 yuzu/configure_gamelist: Use std::array instead of std::vector for translatable strings
We don't need to use an allocating container for these, given we know
the fixed amount of strings being used. This is just a waste of memory.
2018-09-12 01:20:04 -04:00
Lioncash
3a2567c97c yuzu/configure_gamelist: Move combo box initializtion to their own functions
Keeps the individual initialization of the combo boxes logically separate.
We also shouldn't be dumping this sort of thing in the constructor
directly.
2018-09-12 01:07:34 -04:00
bunnei
3ee4fa557f
Merge pull request #1301 from lioncash/qt
game_list: Resolve variable shadowing within LoadCompatibilityList()
2018-09-11 23:13:54 -04:00
bunnei
89825766ee
Merge pull request #1278 from tech4me/bg-color-fix
Port Citra #4047 & #4052: add change background color support
2018-09-11 23:13:11 -04:00
Lioncash
0e61e8362f game_list: Resolve variable shadowing within LoadCompatibilityList()
"value" is already a used variable name within the outermost ranged-for
loop, so this variable was shadowing the outer one. This isn't a bug,
but it will get rid of a -Wshadow warning.
2018-09-11 22:34:09 -04:00
Lioncash
7fe10dea3e game_list: Use QJsonValueRef() within LoadCompatibilityList()
This way, we aren't constructing unnecessary QJsonValue instances.
2018-09-11 22:28:35 -04:00
Markus Wick
3e973bc4c6 gl_rasterizer: Use ARB_texture_storage.
It allows us to use texture views and it reduces the overhead within the GPU driver.

But it disallows us to reallocate the texture, but we don't do so anyways.

In the end, it is the new way to allocate textures, so there is no need to use the old way.
2018-09-11 22:18:46 +02:00
Tobias
804115b2a4 Port #4141 from citra: Joystick hotplug support (#1275)
* Joystick hotplug support (#4141)

* use SDL_PollEvent instead of SDL_JoystickUpdate

Register hot plugged controller by GUID if they were configured in a previous session

* Move SDL_PollEvent into its own thread

* Don't store SDLJoystick pointer in Input Device; Get pointer on each GetStatus call

* Fix that joystick_list gets cleared after SDL_Quit

* Add VirtualJoystick for InputDevices thats never nullptr

* fixup! Add VirtualJoystick for InputDevices thats never nullptr

* fixup! fixup! Add VirtualJoystick for InputDevices thats never nullptr

* Remove SDL_GameController, make SDL_Joystick* unique_ptr

* fixup! Remove SDL_GameController, make SDL_Joystick* unique_ptr

* Adressed feedback; fixed handling of same guid reconnects

* fixup! Adressed feedback; fixed handling of same guid reconnects

* merge the two joystick_lists into one

* make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! fixup! make SDLJoystick a member of VirtualJoystick

* SDLJoystick: Addressed review comments

* Address one missed review comment
2018-09-10 21:29:59 -04:00
MysticExile
d2f788762a
Remove multicore configure_general.ui 2018-09-10 22:04:21 +02:00
MysticExile
17f8059fea
remove multicore in configure_general.cpp 2018-09-10 22:03:23 +02:00
Lioncash
73a2d71f44 game_list: Make CompatibilityList parameter of NavigateToGamedbEntryRequested() a const reference
The compatibility list isn't modified within any of the slots connected
to this signal, so we can make it const to enforce immutability.
2018-09-09 19:46:07 -04:00
Lioncash
bd8065295c 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-09-09 19:45:25 -04:00
tech4me
3dcedb36b4 Port Citra #4047 & #4052: add change background color support 2018-09-08 17:00:21 -07:00
fearlessTobi
a6efff8b02 Add audio stretching support 2018-09-08 18:26:23 +01:00
Pengfei Zhu
4048b54ef7
yuzu: fix title bar display
Previously the version number got hidden after starting a game.
2018-09-08 19:10:50 +08:00
bunnei
9cd79c25ed
Merge pull request #1246 from degasus/instanced_rendering
gl_rasterizer: Use baseInstance instead of moving the buffer points.
2018-09-08 04:49:24 -04:00
bunnei
8b08cb925b gl_rasterizer: Use baseInstance instead of moving the buffer points.
This hopefully helps our cache not to redundant upload the vertex buffer.

# Conflicts:
#	src/video_core/renderer_opengl/gl_rasterizer.cpp
2018-09-08 04:05:56 -04:00
Lioncash
564b7fdc9c 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-09-07 16:25:28 -04:00
CaptV0rt3x
e3af341d5b Better Title Bar Display 2018-09-07 11:54:51 +05:30
fearlessTobi
742f895f8b frontend: Set swap interval to 0 2018-09-06 18:57:51 +02:00
Zach Hilman
c913136eb2 bktr: Fix bucket overlap error 2018-09-04 17:01:54 -04:00
Zach Hilman
23a16c1720 patch_manager: Centralize Control-type NCA parsing 2018-09-04 16:25:10 -04:00
Zach Hilman
c91b60a421 game_list: Fix version display on non-NAND titles 2018-09-04 16:24:02 -04:00
Zach Hilman
2814ca3624 game_list: Use friendly game versions
Mainly, from control.nacp metadata instead of cnmt metadata
2018-09-04 16:24:02 -04:00
Zach Hilman
9664ce255d bktr: Fix missing includes and optimize style 2018-09-04 16:24:02 -04:00
Zach Hilman
f92b3512e0 main: Make game updates installable 2018-09-04 16:24:02 -04:00
Zach Hilman
8e150c46b9 game_list: Display patch names and versions on list 2018-09-04 16:24:02 -04:00
Zach Hilman
d2caf4af7d game_list: Use RegisteredCacheUnion for installed
Reduces code
2018-09-04 16:21:40 -04:00
Zach Hilman
87be4bc283 main: Only show DRD deprecation warning once 2018-09-04 14:44:48 -04:00
Zach Hilman
1280061725 qt: Add deprecation warnings for DRD format 2018-09-04 14:29:19 -04:00
Zach Hilman
8974771334 registration: Fix NSP installation errors 2018-09-04 14:29:19 -04:00
Zach Hilman
58473309a0 qt: Add UI support for NSP files 2018-09-04 14:28:41 -04:00
Zach Hilman
f7eaea424d registration: Add support for installing NSP files 2018-09-04 14:28:41 -04:00
bunnei
ed37b68fb5
Merge pull request #1223 from DarkLordZach/custom-nand-sd-dirs
file_sys: Allow for custom NAND/SD directories
2018-09-04 11:54:22 -04:00
Lioncash
a813c10e1c file_sys: Replace includes with forward declarations where applicable
Cuts down on include dependencies, resulting in less files that need to
be rebuilt when certain things are changed.
2018-09-03 22:52:24 -04:00
Zach Hilman
04397cd185 qt: Add message about not moving contents on dir change 2018-09-03 19:23:33 -04:00
Zach Hilman
1ff3318458 qt: Add UI options to change NAND/SD dirs 2018-09-03 19:23:33 -04:00
Zach Hilman
b2268f1f8d settings: Save and load NAND/SD dirs from config 2018-09-03 19:23:33 -04:00
Lioncash
a405373144 vfs_real: Forward declare IOFile
Eliminates the need to rebuild some source files if the file_util header
ever changes. This also uncovered some indirect inclusions, which have
also been fixed.
2018-09-02 12:38:14 -04:00
fearlessTobi
0f453488e2 citra_qt: Display the unsupported GL extensions in the popup 2018-09-01 19:01:53 +02:00