Commit graph

1237 commits

Author SHA1 Message Date
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
Valentin Vanelslande
57f224fc50 fix clang-format 2018-12-29 09:31:03 -05:00
Valentin Vanelslande
3d00beb9d5 add a comment, rename old index 2018-12-29 09:19:45 -05:00
Valentin Vanelslande
e7b1a1d5c8 fix clang-format 2018-12-29 09:04:43 -05:00
Valentin Vanelslande
60d1822206 if to clamp 2018-12-29 08:39:30 -05:00
Valentin Vanelslande
5a14af5f38 address some comments 2018-12-29 08:27:06 -05:00
Pengfei Zhu
5a4c7c32d8
Update src/citra_qt/configuration/config.cpp
Co-Authored-By: valentinvanelslande <valentinvanelslandeacnl@gmail.com>
2018-12-29 08:14:37 -05:00
Valentin Vanelslande
8e614c3eb0 clang-format; address one comment 2018-12-28 23:31:55 -05:00
Weiyi Wang
fbd0944a5a
Merge pull request #4512 from FearlessTobi/port-1902
Port yuzu-emu/yuzu#1902: "audio_core: Make g_sink_details internally linked"
2018-12-28 22:55:08 -05:00
Valentin Vanelslande
860860397b more fixes 2018-12-28 21:26:50 -05:00
Valentin Vanelslande
e420fb666f another fix 2018-12-28 21:15:18 -05:00
Valentin Vanelslande
6d0c50dfec more fixes 2018-12-28 21:14:44 -05:00
Valentin Vanelslande
bf93b94658 fixes 2018-12-28 21:13:57 -05:00
Mat M
90965525ac
Apply suggestions from code review
Co-Authored-By: valentinvanelslande <valentinvanelslandeacnl@gmail.com>
2018-12-28 21:00:09 -05:00
Valentin Vanelslande
7c95032e3a Add multiple input profile support
Only supported in the Qt frontend.
2018-12-28 20:28:45 -05:00
RicBent
6ad609a539 Added GPIO14 button and UI config buttons 2018-12-28 17:13:37 -06:00
RicBent
7c007eac24 Fixed coding style 2018-12-28 15:13:16 -06:00
RicBent
403d2f0058 Added Debug Button 2018-12-28 12:47:50 -06:00
Weiyi Wang
3ede436053
Merge pull request #4489 from FearlessTobi/port-ui-stuff
Port QT interface changes from yuzu.
2018-12-21 20:52:14 -05:00
Weiyi Wang
443f4b964d DSP/LLE: add multithread mode 2018-12-21 20:49:24 -05:00
Weiyi Wang
05c372bf6c Update teakra to fix macos issue; address comment feedbacks 2018-12-21 20:49:23 -05:00
Weiyi Wang
21da135cc6 Configuration: add option to use DSP LLE 2018-12-21 20:49:22 -05:00