Commit graph

1258 commits

Author SHA1 Message Date
Tobias
a546efad31
Port yuzu-emu/yuzu#2529: "yuzu/bootmanager: Minor interface tid… (#4794)
* yuzu/bootmanager: Remove unnecessary pointer casts

We can just invoke these functions by qualifying the object name before
the function.

* yuzu/bootmanager: unsigned -> u32

Same thing (for platforms we support), less reading.

* yuzu/bootmanager: Default EmuThread's destructor in the cpp file

This class contains non-trivial members, so we should default the
destructor's definition within the cpp file.

* yuzu/bootmanager: Treat the resolution factor as a u32

Treating it as a u16 can result in a sign-conversion warning when
performing arithmetic with it, as u16 promotes to an int when aritmetic
is performed on it, not unsigned int.

This also makes the interface more uniform, as the layout interface now
operates on u32 across the board.

* yuzu/bootmanager: Log out screenshot destination path

We can make this message more meaningful by indicating the location the
screenshot has been saved to. We can also log out whenever a screenshot
could not be saved (e.g. due to filesystem permissions or some other
reason).

* Fix compilation
2019-07-11 18:46:44 +02:00
bunnei
8eff0696fc
Merge pull request #4823 from FearlessTobi/port-2521
Port yuzu-emu/yuzu#2521: "yuzu/configuration: Make function naming consistent"
2019-07-07 21:45:45 -04:00
Lioncash
ba6eb5285d yuzu/configuration: Make function naming consistent 2019-07-06 15:01:41 +02:00
fearlessTobi
b3e819582e Fix compilation problems 2019-07-04 15:47:04 +02:00
Lioncash
e88a9ace8d yuzu/CMakeLists: Disable implicit QString->QUrl conversions
Enforces the use of the proper URL resolution functions. e.g.

url = some_local_path_string;

should actually be:

url = QUrl::fromLocalPath(some_local_path_string);

etc.

This makes it harder to cause bugs when operating with both strings and
URLs at the same time.
2019-07-04 15:39:00 +02:00
Lioncash
3d2e6165d3 yuzu/CMakeLists: Disable unsafe overloads of QProcess' start() function
Other overloads of start() are considerably much safer to use if we ever
need this in the future and need to pass arguments to the program, given
it contains separate parameters for the program path and the arguments
themselves, whereas this unsafe overload contains both as a single
string.

Given the alternatives are much safer, we can disable this.
2019-07-04 15:39:00 +02:00
Lioncash
587b68ed17 yuzu/CMakeLists: Disable implicit type narrowing in connect() calls
Prevents hard-to-diagnose bugs from potentially occurring and requires
any type narrowing to be explicitly performed by our code.
2019-07-04 15:39:00 +02:00
Lioncash
1eef771a10 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-06-09 16:22:43 +02:00
Lioncash
9fc3e4576b configure_hotkeys: Remove unnecessary Settings::Apply() call
Nothing from the hotkeys dialog relies on this call occurring, and is
already called from the dialog that calls applyConfiguration().
2019-06-01 23:12:59 +02:00
Lioncash
0a65f68b4a configure_hotkeys: Tidy up key sequence conflict error string
Avoids mentioning the user and formalizes the error itself.
2019-06-01 23:12:59 +02:00
Lioncash
640543f8e4 configure_hotkeys: Change critical error dialog into a warning dialog
critical() is intended for critical/fatal errors that threaten the
overall stability of an application. A user entering a conflicting key
sequence is neither of those.
2019-06-01 23:12:59 +02:00
Lioncash
4b5cbcae21 sequence_dialog: Reorganize the constructor
The previous code was all "smushed" together wasn't really grouped
together that well.

This spaces things out and separates them by relation to one another,
making it easier to visually parse the individual sections of code that
make up the constructor.
2019-05-29 23:49:47 +02:00
Lioncash
ec837cd16c sequence_dialog: Remove unnecessary horizontal specifier
QDialogButtonBoxes are horizontal by default.
2019-05-29 23:49:37 +02:00
Martin Pecánek
186ffc235f Check input profile name for duplicates in New/Rename (#4779)
* Check input profile name for duplicates in New/Rename

* DRY + separation of concerns

* simplify return branching

* make readonly function const
2019-05-24 15:28:59 -06:00
Weiyi Wang
6848592044
Merge pull request #4744 from FearlessTobi/port-2376
Port yuzu-emu/yuzu#2376: "yuzu/configure_hotkey: Minor changes"
2019-05-18 08:33:37 -04:00
Lioncash
563e1622ca configure_dialog: Remove the Whats This? button from the dialog 2019-05-10 20:33:40 +02:00
Lioncash
eeb8dca7b9 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-10 20:30:50 +02:00
Lioncash
95b413a458 yuzu/compatdb: Remove unnecessary qualifiers
Keeps the code consistent in regards to how the buttons are referred to.
2019-05-10 20:30:32 +02:00
Lioncash
c9cc378312 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-05-07 16:31:43 +02:00
Lioncash
562e0114eb 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-05-07 16:31:43 +02:00
Lioncash
d7d1be509b configure_hotkeys: Mark member variables as const where applicable in Configure() 2019-05-07 16:31:43 +02:00
Lioncash
47176e19be 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-05-07 16:31:43 +02:00
Lioncash
c33c27d646 configure_dialog: Amend constructor initializer list order
Avoids a -Wreorder compiler warning.
2019-05-07 16:31:43 +02:00
Lioncash
21cba77708 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-05-07 16:30:12 +02:00
Lioncash
35281b4b3b 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-05-07 16:30:12 +02:00
Weiyi Wang
46b015befd
Merge pull request #4743 from FearlessTobi/port-2405
Port yuzu-emu/yuzu#2405: "CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt target"
2019-05-07 09:35:18 -04:00
Tobias
623b0621ab
Port various minor changes from yuzu PRs (#4725)
* common/thread: Remove unused functions

Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.

The function for setting the thread name is left, however, since it can
have debugging utility usages.

* input_common/sdl: Use a type alias to shorten declaration of GetPollers

Just makes the definitions a little bit more tidy.

* input_common/sdl: Correct return values within implementations of GetPollers()

In both cases, we weren't actually returning anything, which is
undefined behavior.

* 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).

* 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.

* 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)

* yuzu/debugger/graphics_surface: Display error messages for file I/O errors

* core: Add missing override specifiers where applicable

Applies the override specifier where applicable. In the case of
destructors that are  defaulted in their definition, they can
simply be removed.

This also removes the unnecessary inclusions being done in audin_u and
audrec_u, given their close proximity.

* kernel/thread: Make parameter of GetWaitObjectIndex() const qualified

The pointed to member is never actually modified, so it can be made
const.

* kernel/thread: Avoid sign conversion within GetCommandBufferAddress()

Previously this was performing a u64 + int sign conversion. When dealing
with addresses, we should generally be keeping the arithmetic in the
same signedness type.

This also gets rid of the static lifetime of the constant, as there's no
need to make a trivial type like this potentially live for the entire
duration of the program.

* kernel/codeset: Make CodeSet's memory data member a regular std::vector

The use of a shared_ptr is an implementation detail of the VMManager
itself when mapping memory. Because of that, we shouldn't require all
users of the CodeSet to have to allocate the shared_ptr ahead of time.
It's intended that CodeSet simply pass in the required direct data, and
that the memory manager takes care of it from that point on.

This means we just do the shared pointer allocation in a single place,
when loading modules, as opposed to in each loader.

* kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const

Given this is intended as a querying function, it doesn't make sense to
allow the implementer to modify the state of the given thread.
2019-05-01 14:28:49 +02:00
Lioncash
564032307d CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt target
This is a compile definition introduced in Qt 4.8 for reducing the total
potential number of strings created when performing string
concatenation. This allows for less memory churn.

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

For a change that isn't source-compatible, we only had one occurrence
that actually need to have its type clarified, which is pretty good, as
far as transitioning goes.
2019-05-01 14:26:13 +02:00
Pengfei Zhu
e0a0bca13a
Merge pull request #4749 from zhaowenlan1779/webfix
web_service: Misc fixes
2019-05-01 17:00:17 +08:00
James Rowe
3f2c7eb471
Merge pull request #4738 from FearlessTobi/port-1020-new
Port yuzu-emu/yuzu#1020: "core: Namespace EmuWindow"
2019-04-26 08:58:09 -06:00
Lioncash
6e22891761 core: Namespace EmuWindow
Gets the class out of the global namespace.
2019-04-21 14:16:16 +02:00
Pengfei Zhu
536e4de499
Merge pull request #4700 from zhaowenlan1779/swkbd-2
applets/swkbd: Add callback support
2019-04-20 22:18:15 +08:00
zhupengfei
40ad54c5c7
citra_qt: Update the multiplayer dialogs when game list is repopulated
The multiplayer state object and dialogs hold a (modified) game list model, but it isn't updated when the actual game list changes. This updates the multiplayer dialogs with the new game list when it got repopulated.
2019-04-20 12:50:26 +08:00
zhupengfei
4a9ea65e49
core, citra_qt: Allow credentials update in multiplayer announce session
Allows updating the credentials of the announce session, thus allowing credentials changes to be reflected before citra restart. To avoid race conditions and web errors (you can only update the room that you created, i.e. changing credentials halfway will make it break), now you can only use the Citra Web Services settings when not hosting a public room.
2019-04-20 12:50:24 +08:00
zhupengfei
d6b168d7ed
citra_qt/multiplayer: Disallow hosting rooms when preferred game is not selected
which can happen if the game list is empty, and would result in a 400 being returned from the server as the preferred_game field is empty.
2019-04-20 12:50:20 +08:00
zhupengfei
36051204cc core, web_service: Check for error when registering rooms
The `Register()` function can now handle error results and the error will be passed immediately to the Qt frontend, instead of being ignored silently and failing later with a "Room is not registered".
2019-04-20 12:50:14 +08:00
Weiyi Wang
4a206237be
Merge pull request #4726 from FearlessTobi/port-2312
Port yuzu-emu/yuzu#2312: "general: Use deducation guides for std::lock_guard and std::unique_lock"
2019-04-13 18:00:09 -04:00
Tobias
e9c2b27c68
Merge pull request #4681 from FearlessTobi/port-2188-2190
Port yuzu-emu/yuzu#2188 and yuzu-emu/yuzu#2190: various minor code refactoring changes
2019-04-09 21:18:34 +02:00
zhupengfei
d7fbc1ca2c
common/string_util: Move TextFromBuffer to string_util 2019-04-08 22:34:21 +08:00
zhupengfei
8078256a88 applets/swkbd: Add callback support 2019-04-08 21:45:29 +08:00
fearlessTobi
e9bd34f7da Address remaining review comments 2019-04-07 17:00:28 +02:00
fearlessTobi
1517d2fef7 Address more reviews 2019-04-07 15:35:32 +02:00
fearlessTobi
781d4b787a Address first batch of review comments 2019-04-07 15:35:32 +02:00
fearlessTobi
041638ea4d applets: implement HLE mii selector applet 2019-04-07 15:35:29 +02:00
Lioncash
21c71d21ae general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-07 15:14:29 +02:00
Adityarup Laha
ebba9f5a70
ConfigureInput::GetUsedKeyboardKeys(): Change index of home button to use NativeButton instead of magic number.
Fixes a bug where users can't bind anything to the B key.
Arises because this was not changed in #4537.
2019-04-06 10:41:28 +05:30
Weiyi Wang
5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
Vamsi Krishna
aedf5a84b0
Merge pull request #4671 from jroweboy/mic4
Microphone support
2019-03-20 23:12:38 +05:30
Lioncash
65572a0fb8 yuzu: Remove usage of the global telemetry accessor
In these cases the system object is nearby, and in the other, the
long-form of accessing the telemetry instance is already used, so we can
get rid of the use of the global accessor.
2019-03-17 23:17:57 +01:00
liushuyu
ca46b4c3e2
frontend: qt: fix a freeze where...
... if you click on entry in the game list too fast, citra will hang
2019-03-12 13:35:33 -06:00
bunnei
c3e6610807
Merge pull request #4627 from FearlessTobi/cia-install-short
citra_qt: when opening a cia file directly, make Citra ask to install it
2019-03-07 23:55:58 -05:00
bunnei
9560060f04
Merge pull request #4666 from FearlessTobi/port-2167
Port yuzu-emu/yuzu#2167: "common: Move Quaternion, Rectangle, Vec2, Vec3, and Vec4 into the Common namespace"
2019-03-07 23:52:42 -05:00
James Rowe
f5b86cff52 Clang-format 2019-03-06 22:43:35 -07:00
James Rowe
f5df13eb24 Remove global state and add mic hot swapping 2019-03-06 20:59:58 -07:00
James Rowe
182d672c15 Add ifdef around cubeb for android. Address a few review comments 2019-03-06 20:03:22 -07:00
James Rowe
5f532c2560 Address review comments 2019-03-06 11:16:43 -07:00
Pengfei Zhu
3ea30fe2b3
Merge pull request #4610 from zhaowenlan1779/cheats-ui
Implement UI for adding/editing/deleting cheats
2019-03-05 22:07:40 +08:00
James Rowe
c669aa8d55 Rest of the owl 2019-03-04 23:07:05 -07:00
James Rowe
7fccc995ce Initial Mic setup 2019-03-04 23:06:42 -07:00
Lioncash
643472e24a common/vector_math: Move Vec[x] types into the Common namespace
These types are within the common library, so they should be using the
Common namespace.
2019-03-02 15:04:13 +01:00
Lioncash
6149be43cf yuzu/compatdb: Remove unused lambda capture
Silences a compiler warning with clang.
2019-03-02 14:04:13 +01:00
Weiyi Wang
b0a4220711
Merge pull request #4647 from FearlessTobi/fix-weird-bug
citra_qt/main: make SPEED_LIMIT_STEP static constexpr
2019-02-22 16:21:54 -05:00
fearlessTobi
c357531acb citra_qt/main: make SPEED_LIMIT_STEP static constexpr
MSVC does not seem to like using constexpr values in a lambda that were declared outside of it.
Previously on MSVC build the hotkeys to inc-/decrease the speed limit were not working correctly because in the lambda the SPEED_LIMIT_STEP had garbage values.
After googling around a bit I found: https://github.com/codeplaysoftware/computecpp-sdk/issues/95 which seems to be a similar issue.
Trying the suggested fix to make the variable static constexpr also fixes the bug here.
2019-02-20 16:11:38 +01:00
fearlessTobi
70653c6a87 citra_qt/config: actually save name of input profile
Fixes the issue where all input profiles had the name "default" after restarting Citra.
2019-02-16 21:41:51 +01:00
fearlessTobi
931895d9b0 citra_qt: when opnening a cia file directly, make Citra ask to install it 2019-02-16 17:18:19 +01:00
Weiyi Wang
de1128c60d
Merge pull request #4628 from FearlessTobi/backport-some-stuff
Backport various minor frontend review changes from yuzu and port minor PR from yuzu
2019-02-14 11:45:27 -05:00
fearlessTobi
e5495e541d citra_qt/config: backport minor changes from yuzu 2019-02-13 21:06:37 +01:00
fearlessTobi
59dbc72e7b configure_dialog: backport minor changes from yuzu 2019-02-13 21:06:24 +01:00
tgsm
ee0afb4318 citra_qt: show demos on game list 2019-02-08 19:04:05 -05:00
Weiyi Wang
f620c862f3
Merge pull request #4437 from adityaruplaha/hotkey-config-squashed
citra-qt: Make hotkeys configurable via the GUI (Attempt 2)
2019-02-03 21:57:34 -05:00
zhupengfei
433176a9b9
citra_qt: Implement UI for adding/editing/deleting cheats
The UI file is rewritten, to better make use of Qt's layouts (instead of depending on abstract geometry). "Add Cheat", "Save", "Delete" buttons are also added.

The UI logic should be rather easy and usable (IMO), but the code may seem a bit dirty. If anyone has a better idea regarding UI logic design or code implementation, feel free to tell me about it.
2019-02-02 08:15:27 +08:00
Weiyi Wang
2731437a17
Merge pull request #4583 from xperia64/screenshot_fix
citra_qt: Fix saving screenshot when no file extension is provided
2019-02-01 10:49:28 -05:00
Adityarup Laha
80ebd75285
citra-qt: Add /default parsing for hotkeys. Also minor code cleanups. 2019-01-25 20:42:49 +05:30
Weiyi Wang
8b047a49ae
Merge pull request #4586 from xperia64/qt_color_button_fix
citra_qt: Use QPixmap/QIcon for background color selection button
2019-01-23 20:24:57 -05:00
Weiyi Wang
054a97c08b
Merge pull request #4579 from xperia64/3d_slider
Change 3D Slider in-game
2019-01-23 20:23:55 -05:00
Lioncash
c1a066fa89 yuzu/configuration/configure_web: Remove an unused lambda capture
'this' isn't actually used within the lambda, since what we need
from the class is already assigned within the capture section of
the lambda.
2019-01-21 22:11:02 +01:00
Lioncash
b16445064b yuzu/configuration/configure_web: Use an ellipsis with 'Verifying' text
It's a common UI pattern to use an ellipsis to indicate an ongoing
action, rather than just specifying the word by itself.
2019-01-21 22:10:56 +01:00
bunnei
efd5768398
Merge pull request #4457 from FearlessTobi/remove-vsync
citra_qt: Remove V-Sync option
2019-01-21 15:56:12 -05:00
xperia64
ce26de858a Use QPixmap/QIcon for background color selection button 2019-01-20 22:09:23 -05:00
Adityarup Laha
71f36efd27
citra-qt: Use structured bindings where applicable in ConfigureHotkeys::applyConfiguration. Fix a few minor issues.
* Address https://github.com/citra-emu/citra/pull/4437#discussion_r241380912
2019-01-20 16:14:07 +05:30
Adityarup Laha
dccd1664ad
citra-qt/configuration: Fix a weird issue where the tab UI disappears when language is changed. 2019-01-20 16:14:03 +05:30
Adityarup Laha
988acf588a
citra-qt: Add back missing hotkeys & conflict fixes.
* Also fixed a missing spacer in ConfigureGeneral.
2019-01-20 16:13:59 +05:30
Adityarup Laha
4309585623
citra-qt: Commented & documented code related to hotkeys as & when required. 2019-01-20 16:13:54 +05:30
Adityarup Laha
9615acb550
citra-qt: Fixed reloading hotkeys on-the fly. 2019-01-20 16:13:49 +05:30
Adityarup Laha
5fa25fcf13
citra-qt: Add base support for hotkey reconfiguration + UI (whole of PR citra-emu/citra#3786)
* Adds a new Hotkeys tab in the Controls group.
* Right click to reconfigure.
* See the original PR for more details & screenshots.
2019-01-20 16:12:10 +05:30
xperia64
c6d623f4ba Fix crash when no files are selected 2019-01-19 22:14:19 -05:00
xperia64
82acde7e4b Add file extension to screenshot filename if not provided 2019-01-19 22:10:30 -05:00
Frederic Laing
5df6506e81 game_list: Remove a reference of a reference 2019-01-19 21:30:32 +01:00
fearlessTobi
1302c9c1e7 frontend: Remove V-Sync option from UI
The V-Sync option is fundamentally broken in Citra, so let's do the same as yuzu and remove it entirely for SDL2 and at least from the frontend for QT.
(It was also only used by 7.3% of users)
2019-01-19 17:43:44 +01:00
xperia64
c1ac39f058 Actually fix the race condition 2019-01-18 16:32:16 -05:00
Weiyi Wang
95a57a2fe3
Merge pull request #4538 from valentinvanelslande/profiles
Add multiple input profile support
2019-01-17 22:32:24 -05:00
James Rowe
3523831195 Frontend: Only reload icons in chat when the chat room is open 2019-01-17 12:25:17 -07:00
zhupengfei
2d65371c20
citra_qt/multiplayer: Update themed icon on theme change 2019-01-16 22:01:21 +08:00
zhupengfei
5f0dcd52ae
multiplayer: minor UI fixes
Just two minor fixes:
1. Font color is black in dark theme. It is now only black for pings.
2. If a user is called `abc`, you can ping them by `@abc_`. Now a ping only takes effect when there are spaces around it.
2019-01-13 22:21:04 +08:00
Ben
4f23d5d69e
Merge pull request #4490 from wwylele/teakra-new
audio: implement DSP LLE
2019-01-11 16:45:00 +01:00
Valentin Vanelslande
62b40e9155
Merge branch 'master' into profiles 2019-01-07 10:39:44 -05:00
Weiyi Wang
941d241e7d
Merge pull request #4537 from RicBent/master
Added Debug/GPIO14 Buttons
2019-01-07 10:07:31 -05:00
Valentin Vanelslande
df02ea48d2 minor ui changes 2018-12-29 19:28:56 -05:00
Valentin Vanelslande
64b992487e fix regression 2018-12-29 16:23:33 -05:00
Valentin Vanelslande
dce82fa005 move comment 2018-12-29 13:15:31 -05:00