Commit graph

786 commits

Author SHA1 Message Date
bunnei
68c9c9222d
Merge pull request #2358 from ReinUsesLisp/parallel-shader
gl_shader_cache: Use shared contexts to build shaders in parallel at boot
2019-05-24 22:42:08 -04:00
Lioncash
d623e38d18 yuzu/configuration/configure_graphics: Eliminate type narrowing in a connect call
A checkbox is able to be tri-state, giving it three possible activity
types, so in the connect call here, it would actually be truncating an
int into a bool.

Instead, we can just listen on the toggled() signal, which passes along
a bool, not an int.
2019-05-24 22:24:40 -04:00
Lioncash
3c0280cf66 yuzu/CMakeLists: Disable implicit QString conversions
Now that all of our code is compilable with implicit QString
conversions, we can enforce it at compile-time by disabling them.
2019-05-24 21:31:01 -04:00
Lioncash
bb06b98d81 yuzu/applets/software_keyboard: Remove unused assert header
This isn't actually used anywhere, so it can be removed.
2019-05-24 21:27:13 -04:00
Lioncash
16bf791939 yuzu/applets/software_keyboard: std::move argument in MainWindowFinishedText()
Given the std::optional can contain an object type that heap allocates,
we can use std::move to avoid an unnecessary copy/allocation from
occurring.
2019-05-24 21:27:12 -04:00
Lioncash
b3d7180164 yuzu/applets/software_keyboard: Resolve sign mismatch comparison
Qt uses a signed value to represent container sizes, so this was causing
a sign mismatch warning.
2019-05-24 21:27:12 -04:00
Lioncash
cf9cc41478 yuzu/applets/software_keyboard: Specify string conversions explicitly
Allows the software keyboard applet code to compile with implicit string
conversions disabled.
2019-05-24 21:27:12 -04:00
Lioncash
f5d416e071 yuzu/applets/error: Specify string conversions explicitly
Allows the error applet to build successfully with implicit string
conversions disabled.
2019-05-24 21:27:12 -04:00
Lioncash
6f2a8fbb13 yuzu/main: Specify string conversions where applicable 2019-05-24 21:27:09 -04:00
ReinUsesLisp
c03b8c4c19 gl_shader_cache: Use shared contexts to build shaders in parallel 2019-05-20 22:45:55 -03:00
Lioncash
f49a04ba39 yuzu/configuration/config: Make default hotkeys an internally-linked array in the cpp file
Given the array is a private static array, we can just make it
internally linked to hide it from external code. This also allows us to
remove an inclusion within the header.
2019-05-20 21:09:35 -04:00
Lioncash
938d6dca30 yuzu/configuration/config: Specify string conversions explicitly
Allows the configuration code to build successfully with implicit string
conversions disabled.
2019-05-20 21:08:32 -04:00
bunnei
9ffc60b5b3
Merge pull request #2455 from lioncash/config
configuration/config: Move config loading and saving to functions based off groups
2019-05-20 20:46:05 -04:00
Lioncash
bc32474901 yuzu/game_list: Specify string conversions explicitly
Allows the game list code to compile successfully with implicit string
conversions disabled.
2019-05-20 15:30:50 -04:00
Lioncash
ed2fedac13 yuzu/game_list_worker: Specify string conversions explicitly
Allows the game list worker code to compile successfully with implicit
string conversions disabled.
2019-05-20 15:07:59 -04:00
Lioncash
7a82d6f394 yuzu/game_list_p: Amend mentions of SMDH in comments
SMDH is a metadata format used in some executable formats for the
Nintendo 3DS. Switch executables don't utilize this metadata format, so
this just a holdover from Citra and can be corrected.
2019-05-20 15:04:35 -04:00
Lioncash
486c3e6085 yuzu/game_list_p: Specify string conversions explicitly
Allows the game list item code to build with implicit string conversions
disabled.
2019-05-20 15:02:37 -04:00
Lioncash
922d8c6cb4 yuzu/loading_screen: Specify string conversions explicitly
Allows the loading screen code to compile with implicit string
conversions disabled.

While we're at it remove unnecessary const usages, and add it to nearby
variables where appropriate.
2019-05-20 14:53:44 -04:00
Lioncash
fd34732e26 yuzu/bootmanager: Specify string conversions explicitly
Allows the bootmanager code to compile with implicit string conversions
disabled.
2019-05-20 14:50:53 -04:00
Lioncash
317f1263fb yuzu/util: Specify string conversions explicitly
Allows the util code to build with implicit string conversions disabled.
2019-05-20 14:44:42 -04:00
Lioncash
2318c394a8 yuzu/configuration/configure_web: Specify string conversions explicitly
Allows the web config code to compile with implicit string conversions
disabled. We can also deduplicate the calls to create the pixmap.
2019-05-19 13:05:09 -04:00
Lioncash
d9c4d64ed5 yuzu/configuration/configure_system: Specify string conversions explicitly
Allows the system config code to build successfully with implicit string
conversions disabled.
2019-05-19 12:56:43 -04:00
Lioncash
428d8098a7 yuzu/configuration/configure_profile_manager: Mark UI string as translatable
This is a user-facing string, so it should be marked as translatable.
2019-05-19 12:54:04 -04:00
Lioncash
17255cd835 yuzu/configuration/configure_per_general: Specify string conversions explicitly
Allows the per-game configuration to be successfully built with implicit
string conversions disabled.
2019-05-19 12:47:33 -04:00
Lioncash
3039211c20 yuzu/configuration/configure_mouse_advanced: Clean up array accesses
Deduplicates array accesses and uses a named variable where appropriate.
2019-05-19 12:34:18 -04:00
Lioncash
c9c4208c4a yuzu/configuration/configure_mouse_advanced: Specify string conversions explicitly
Allows the advanced mouse configuration code to build with implicit
string conversions disabled.
2019-05-19 12:34:18 -04:00
Lioncash
aa83639b78 yuzu/configuration/configure_input_player: Clean up array accesses
Rather than repeatedly index arrays that have quite a large array index,
we can just use a named variable instead.
2019-05-19 12:34:15 -04:00
Lioncash
4d2da5a40a yuzu/configuration/configure_input_player: Specify string conversions explicitly
Allows the player input configuration code to compile with implicit
string conversions disabled.
2019-05-19 11:38:31 -04:00
Lioncash
d81d4a0f68 yuzu/configuration/configure_input: Mark controller type names as translateable
These are user-facing strings, so they should be localizable.
2019-05-19 11:23:25 -04:00
Lioncash
7e650088dd yuzu/configuration/configure_general: Specify string conversions explicitly
Allows the general configuration code to successfully compile with
implicit string conversions disabled.
2019-05-19 11:18:16 -04:00
Lioncash
05235ccaa9 yuzu/configuration/configure_gamelist: Specify string conversions explicitly
Allows the gamelist configuration code to compile with implicit string
conversions disabled.
2019-05-19 11:16:23 -04:00
Lioncash
5f01ec338e yuzu/configuration/configure_audio: Store power on query into a variable
Avoids using the system accessor more than necessary, and ensures that
both dialog boxes see the same power on state.
2019-05-19 11:12:31 -04:00
Lioncash
d00ca5c6c8 yuzu/configuration/configure_audio: Tidy up function cast
We can just use qOverload here to tidy up the function cast.
2019-05-19 11:10:58 -04:00
Lioncash
d184224e8f yuzu/configuration/configure_audio: Specify string conversions explicitly
Allows the audio configuration code to build with implicit string
conversions disabled.
2019-05-19 11:08:56 -04:00
Hexagon12
ac3775e6ae
Merge pull request #2468 from lioncash/deduction
yuzu: Remove explicit types from locks where applicable
2019-05-19 15:05:56 +01:00
Hexagon12
209a0dfa35
Merge pull request #2492 from lioncash/debugger
yuzu/debugger: Specify string conversions explicitly
2019-05-19 14:49:54 +01:00
Sebastian Valle
27033de2e5
Merge pull request #2486 from lioncash/resetname
core/kernel/object: Rename ResetType enum members for clarity
2019-05-19 08:47:59 -05:00
Sebastian Valle
256e5c9583
Merge pull request #2493 from lioncash/translate
yuzu/applets/profile_select: Mark header string as translatable
2019-05-19 08:42:39 -05:00
Hexagon12
2437ca04d7
Merge pull request #2476 from ReinUsesLisp/fix-compat
yuzu/bootmanager: Explicitly enable deprecated OpenGL features on compat
2019-05-19 14:31:52 +01:00
Lioncash
bc6972caf9 yuzu/util: Remove unused spinbox.cpp/.h
This has been left unused since the removal of the vestigial surface
viewer. Given it has no uses left, this can be removed as well.
2019-05-19 05:35:34 -04:00
Lioncash
22324e3ef1 yuzu/applets/profile_select: Mark header string as translatable
This is a user-facing string, so it should be marked as translatable.
2019-05-19 01:18:37 -04:00
Lioncash
d77d1a0207 yuzu/debugger/graphics/graphics_breakpoints: Specify string conversions explicitly
Allows the graphics breakpoints to compile with implicit string
conversions disabled.
2019-05-19 01:10:05 -04:00
Lioncash
cad4f2ed29 yuzu/debugger/profiler: Specify string conversions explicitly
This allows the microprofile widget to compile with implicit string
conversions disabled.
2019-05-19 01:10:05 -04:00
Lioncash
a059b9eed4 yuzu/debugger/wait_tree: Specify string conversions explicitly
Allows compiling the wait tree widget with implicit string conversions
disabled.
2019-05-19 01:10:05 -04:00
Lioncash
a47aaa7f1b core/kernel/object: Rename ResetType enum members
Renames the members to more accurately indicate what they signify.
"OneShot" and "Sticky" are kind of ambiguous identifiers for the reset
types, and can be kind of misleading. Automatic and Manual communicate
the kind of reset type in a clearer manner. Either the event is
automatically reset, or it isn't and must be manually cleared.

The "OneShot" and "Sticky" terminology is just a hold-over from Citra
where the kernel had a third type of event reset type known as "Pulse".
Given the Switch kernel only has two forms of event reset types, we
don't need to keep the old terminology around anymore.
2019-05-18 15:52:51 -04:00
bunnei
fb85d5670d
Merge pull request #2457 from lioncash/about
yuzu/{about_dialog, main}: Specify string conversions explicitly for SCM-related info
2019-05-17 15:42:43 -04:00
ReinUsesLisp
4cf64f8e09 qt/configure_graphics: Shadow options at runtime
Compatibility profile and the disk shader cache settings shouldn't
be changed at runtime. This aims to address that shadowing those
options.
2019-05-17 04:29:20 -03:00
ReinUsesLisp
e6c60b419c yuzu/bootmanager: Explicitly enable deprecated OpenGL features on compat
Nvidia's proprietary driver creates a real OpenGL compatibility profile
without this option, meanwhile Intel (and probably AMD, I haven't tested
it) require that QSurfaceFormat::FormatOption::DeprecatedFunctions is
explicitly enabled.
2019-05-17 04:09:17 -03:00
Lioncash
d6d809db87 yuzu: Remove explicit types from locks where applicable
With C++17's deduction guides, the type doesn't need to be explicitly
specified within locking primitives anymore.
2019-05-14 08:18:48 -04:00
bunnei
9567b3a293
Merge pull request #2458 from lioncash/hotkey
yuzu/hotkeys: Remove unnecessary constructor
2019-05-09 13:21:36 -04:00
bunnei
c6f3831320
Merge pull request #2456 from lioncash/qualifier
yuzu/compatdb: Remove unnecessary qualifiers
2019-05-09 13:21:04 -04:00
Lioncash
f3c18d622e configure_dialog: Remove the Whats This? button from the dialog 2019-05-09 03:20:13 -04:00
Lioncash
8bdef4f951 yuzu/hotkeys: Remove unnecessary constructor
The behavior of the Hotkey constructor is already accomplished via in-class member
initializers, so the constructor is superfluous here.
2019-05-09 02:17:22 -04:00
Lioncash
d955944869 yuzu/main: Move window title updating logic to its own function
For similar reasons to the previous change, we move this to a single
function, so we don't need to duplicate the conversion logic in several
places within main.cpp.
2019-05-09 01:46:01 -04:00
Lioncash
bf1829a717 yuzu/about_dialog: Specify string conversions explicitly
Specifies the conversions explicitly to avoid implicit conversions from
const char* to QString. This makes it easier to disable implicit QString
conversions in the future.

In this case, the implicit conversion was technically wrong as well. The
implicit conversion treats the input strings as ASCII characters. This
would result in an incorrect conversion being performed in the rare case
a branch name was created with a non-ASCII Unicode character, likely
resulting in junk being displayed.
2019-05-09 01:18:37 -04:00
Lioncash
a97120efc1 yuzu/compatdb: Remove unnecessary qualifiers
Keeps the code consistent in regards to how the buttons are referred to.
2019-05-09 01:08:06 -04:00
Lioncash
4ef3329f81 configuration/config: Move config loading and saving to functions based off groups
Over time our config values have grown quite numerous in size.
Unfortunately it also makes the single functions we have for loading and
saving values more error prone.

For example, we were loading the core settings twice when they only
should have been loaded once. In another section, a variable was
shadowing another variable used to load settings from a completely
different section.

Finally, in one other case, there was an extraneous endGroup() call used
that didn't need to be done. This was essentially dead code and also a
bug waiting to happen.

This separates the section loading code into its own separate functions.
This keeps variables only visible to the code that actually needs it,
and makes it much easier to visually see the end of each individual
configuration group. It also makes it much easier to visually catch bugs
during code review.

While we're at it, this also uses QStringLiteral instead of raw string
literals, which both avoids constructing a lot of QString instances, but
also makes it much easier to disable implicit ASCII to QString and
vice-versa in the future via setting QT_NO_CAST_FROM_ASCII and
QT_NO_CAST_TO_ASCII as compilation flags.
2019-05-09 00:52:49 -04:00
Zach Hilman
851c01c45e profile_select: Port Service::Account::UUID to Common::UUID 2019-04-25 08:13:11 -04:00
bunnei
78574e7a47
Merge pull request #2416 from lioncash/wait
kernel/svc: Clean up wait synchronization related functionality
2019-04-24 22:56:08 -04:00
bunnei
94db649205
Merge pull request #2424 from FernandoS27/compat
Allow picking a Compatibility Profile for OpenGL.
2019-04-24 22:54:27 -04:00
bunnei
53f746fa9a
Merge pull request #2228 from DarkLordZach/applet-manager-p1
applets: Add AppletManager and implement PhotoViewer and Error applets
2019-04-24 22:53:21 -04:00
Fernando Sahmkow
788497fd9d Allow picking a Compatibility Profile for OpenGL.
This option allows picking the compatibility profile since a lot of bugs
are fixed in it. We devs will use this option to easierly debug current
problems in our Core implementation.:wq
2019-04-20 00:05:24 -04:00
Zach Hilman
2adb226b26 web_browser: Make OpenPage non-const 2019-04-17 11:35:24 -04:00
Zach Hilman
8f8049e846 main: Add GMainWindow hooks for Error display 2019-04-17 11:35:24 -04:00
Zach Hilman
a04d36c5a4 main: Switch to AppletManager for frontend 2019-04-17 11:35:24 -04:00
Zach Hilman
76452cd5b3 qt: Add dialog implementation of Error applet 2019-04-17 11:35:24 -04:00
Zach Hilman
f7540157e4 web_browser: Make OpenPage const 2019-04-17 11:35:24 -04:00
Lioncash
c268ffd831 kernel/thread: Unify wait synchronization types
This is a holdover from Citra, where the 3DS has both
WaitSynchronization1 and WaitSynchronizationN. The switch only has one
form of wait synchronizing (literally WaitSynchonization). This allows
us to throw out code that doesn't apply at all to the Switch kernel.

Because of this unnecessary dichotomy within the wait synchronization
utilities, we were also neglecting to properly handle waiting on
multiple objects.

While we're at it, we can also scrub out any lingering references to
WaitSynchronization1/WaitSynchronizationN in comments, and change them
to WaitSynchronization (or remove them if the mention no longer
applies).
2019-04-17 09:30:56 -04:00
Lioncash
54e9f9b6ed yuzu/bootmanager: Replace unnnecessary constructor initializer list member of GGLContext
The default constructor will always run, even when not specified, so
this is redundant.

However, the context member can indeed be initialized in the constructor
initializer list.
2019-04-17 00:04:10 -04:00
Lioncash
52e43734c4 yuzu/bootmanager: Remove unnecessary includes
This include isn't used anymore so it can be removed.
2019-04-16 23:52:57 -04:00
Lioncash
fbfc347351 yuzu/bootmanager: Resolve constructor initializer list warnings
Resolves -Wreorder warnings. These will automatically be initialized to
nullptr anyways, so these were redundant.
2019-04-16 23:49:26 -04:00
bunnei
be6b9e2d2b
Merge pull request #2405 from lioncash/qt
CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt target
2019-04-16 22:17:09 -04:00
bunnei
2654eb659e
Merge pull request #2376 from lioncash/const
yuzu/configure_hotkey: Minor changes
2019-04-16 22:13:12 -04:00
Lioncash
d28bb56c91 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-04-15 17:59:41 -04:00
bunnei
6088898b02
Merge pull request #2357 from zarroboogs/force-30fps-mode
Add a toggle to force 30FPS mode
2019-04-13 22:14:04 -04:00
bunnei
065f83c6c3
Merge pull request #2017 from jroweboy/glwidget
Frontend: Migrate to QOpenGLWindow and support shared contexts
2019-04-13 22:08:40 -04:00
FreddyFunk
382722b9c4 Fix Clang Format 2019-04-12 16:40:35 +02:00
FreddyFunk
dffa1a872a ui_settings: Rename game directory variables 2019-04-11 19:55:56 +02:00
bunnei
f46c3164e7
Merge pull request #2353 from lioncash/surface
yuzu/debugger: Remove graphics surface viewer
2019-04-09 21:20:02 -04:00
Lioncash
e1101d3e20 configure_hotkeys: Pass the dialog as a parent to SequenceDialog()
Without passing in a parent, this can result in focus being stolen from
the dialog in certain cases.

Example:

On Windows, if the logging window is left open, the logging Window will
potentially get focus over the hotkey dialog itself, since it brings all
open windows for the application into view. By specifying a parent, we
only bring windows for the parent into view (of which there are none,
aside from the hotkey dialog).
2019-04-09 20:06:49 -04:00
Lioncash
b47c0c8a80 configure_hotkeys: Avoid dialog memory leak within Configure()
Without a parent, this dialog won't have its memory freed when it
happens to get destroyed.
2019-04-09 20:05:57 -04:00
Lioncash
dbf13f8169 configure_hotkeys: Mark member variables as const where applicable in Configure() 2019-04-09 19:50:14 -04:00
Lioncash
cf6cdd20f8 configure_hotkeys: Make comparison check a little more self-documenting
This is checking if an index is valid or not and returning early if it
isn't.
2019-04-09 19:47:20 -04:00
Lioncash
c4ba717491 configure_dialog: Amend constructor initializer list order
Avoids a -Wreorder compiler warning.
2019-04-09 19:39:43 -04:00
Lioncash
8c05dfaa61 configure_hotkey: Remove unnecessary include
Avoids dumping all of the core settings machinery into whatever files
include this header. Nothing inside the header itself actually made use
of anything in settings.h anyways.
2019-04-09 19:37:08 -04:00
Lioncash
e28a5b0d18 configure_hotkey: Make IsUsedKey() a const member function
This doesn't actually modify instance state of the dialog, so this can
be made const.
2019-04-09 19:35:54 -04:00
bunnei
61f63bb994
Merge pull request #1957 from DarkLordZach/title-provider
file_sys: Provide generic interface for accessing game data
2019-04-09 19:16:37 -04:00
bunnei
1a3098f11a
Merge pull request #2132 from FearlessTobi/port-4437
Port citra-emu/citra#4437: "citra-qt: Make hotkeys configurable via the GUI (Attempt 2)"
2019-04-09 18:08:30 -04:00
Lioncash
b73e433dff yuzu/loading_screen: Resolve runtime Qt string formatting warnings
In our error console, when loading a game, the strings:

QString::arg: Argument missing: "Loading...", 0
QString::arg: Argument missing: "Launching...", 0

would occasionally pop up when the loading screen was running. This was
due to the strings being assumed to have formatting indicators in them,
however only two out of the four strings actually have them.

This only applies the arguments to the strings that have formatting
specifiers provided, which avoids these warnings from occurring.
2019-04-09 10:49:38 -04:00
zarroboogs
be6466d5c0 added a toggle to force 30fps mode 2019-04-09 02:14:03 +03:00
Lioncash
218ae888f3 yuzu/debugger: Remove graphics surface viewer
This doesn't actually work anymore, and given how long it's been left in
that state, it's unlikely anyone actually seriously used it.

Generally it's preferable to use RenderDoc or Nsight to view surfaces.
2019-04-05 23:54:00 -04:00
Lioncash
c0e320ad0d yuzu/debugger/graphics_surface: Display error messages for file I/O errors 2019-04-05 19:54:53 -04:00
Lioncash
845607481c yuzu/debugger/graphics_surface: Tidy up SaveSurface
- Use QStringLiteral where applicable.

- Use const where applicable

- Remove unnecessary precondition check (we already assert the pixbuf
  being non null)
2019-04-05 19:33:00 -04:00
Lioncash
bbeb859122 yuzu/debugger/graphics_surface: Clean up connection overload deduction
We can utilize qOverload with the signal connections to make the
function deducing a little less ugly.
2019-04-05 19:26:43 -04:00
Lioncash
9d296f8a35 yuzu/debugger/graphics_surface: Fill in missing surface format listings
Fills in the missing surface types that were marked as unknown. The
order corresponds with the TextureFormat enum within
video_core/texture.h.

We also don't need to all of these strings as translatable (only the
first string, as it's an English word).
2019-04-05 19:09:56 -04:00
bunnei
9959c95966
Merge pull request #2331 from lioncash/cache
yuzu/main: Minor adjustments to OnTransferableShaderCacheOpenFile()
2019-04-04 22:35:53 -04:00
Lioncash
e8f3d85ea5 yuzu/main: Remove unnecessary includes
While we're at it, don't use <QtGui> and <QtWidgets> and instead include
exactly which headers we actually need.
2019-04-04 11:29:19 -04:00
Lioncash
e5bb07a973 yuzu/main: Use QStringLiteral where applicable within OnTransferableShaderCacheOpenFile()
Allows these strings to have no allocation cost when used at runtime.
2019-04-04 00:12:55 -04:00
Lioncash
5ba5f82082 yuzu/main: Tidy up the error dialog string in OnTransferableShaderCacheOpenFile()
Rather than scream that the file doesn't exist, we can clearly state
what specifically doesn't exist, to avoid ambiguity, and make it easier
to understand for non-primary English speakers/readers.
2019-04-04 00:12:04 -04:00
Lioncash
3f8c9b25d8 yuzu/main: Remove unnecessary string concatenation in OnTransferableShaderCacheOpenFile()
We can just make the trailing portion of the string part of the
formatting, getting rid of the need to make another temporary string.
2019-04-03 23:58:58 -04:00