Commit graph

383 commits

Author SHA1 Message Date
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
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