Commit graph

4105 commits

Author SHA1 Message Date
SutandoTsukai181
485d64ae73
citra-qt: Add an "Alternative Speed Limit" with its hotkey (#5281)
* Change "Toggle Speed Limit" to toggle between 100% and a custom value

This will change the shortcut for "Toggle Speed Limit" to make it swap between 100% and the value of "Limit Speed Percent" in the config. Old functionality is still there, but renamed to "Unthrottle".

* Complete reimplementation of the function

* Fix something that didn't get saved correctly

* Fix missing indentation

* Rewrite to keep only a single QSpinBox

* Second rewrite

* set Unthrottled to 0 in the Qspinbox

* Hotkey for Unthrottle

* minor improvements to the design

* Apply suggestions from code review

Co-authored-by: Ben <bene_thomas@web.de>

* Default slider values

* clang-format fixes

* Prevent the speed slider from changing size

...when an element in its row has variable width.

* Change "Game Speed" to "Emulation Speed"

* Apply suggestions from code review

`game_speed` to` emulation_speed`

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>

* Fix for QSliders

* Revert "Prevent the speed slider from changing size"

This reverts commit ddaca20044.

* clang-format

...doesn't seem to stick to a choice

* Fix 2 for QSliders

Co-authored-by: B3n30 <benediktthomas@gmail.com>
Co-authored-by: Ben <bene_thomas@web.de>
Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2020-06-20 13:52:14 -05:00
Ben
cb44e4408d
Improve performance of applying cheats; Set correct interval for applying cheats (#5305) 2020-06-20 13:20:31 -05:00
LC
902cc1eb49
am: Resolve truncation and sign conversion warnings in WriteContentData() (#5397)
We can adjust the API to allow std::size_t indices, which simplifies
operating with standard container types. It also prevents truncation
warnings from occurring in these cases as well.
2020-06-20 13:09:56 -05:00
LC
8ce81b19be
General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
2020-06-19 09:10:45 -05:00
LC
f7aaa37bf2
archive: Make use of std::pair for OpenFileFromArchive (#5399)
* archive: Make use of std::pair for OpenFileFromArchive

The tuple only makes use of two elements, so we can use a pair to
simplify the number of underlying template instantiations that need to
be done, while also simplifying the surrounding code.

* archive: Simplify MakeResult calls

MakeResult can deduce the contained result type based off the type of
the variable being passed to it, so explicitly specifying it is a little
verbose.
2020-06-19 09:02:00 -05:00
xperia64
2e24183e53
Interpolation v2, w/vector and roundf (#5350) 2020-06-14 14:56:10 -04:00
Pengfei Zhu
16913feb44
Merge pull request #5273 from xperia64/frame_timing_tweak
Update FPS to roughly match the actual 3DS rate
2020-06-12 22:14:03 +08:00
xperia64
b0aa58ba56 Fix cheat frame interval 2020-06-11 23:29:12 -04:00
xperia64
c873b38387 Update codec information 2020-06-11 22:05:29 -04:00
Pengfei Zhu
9b20ff0369
Merge pull request #5401 from xperia64/fix_pipe_read_size
Fix ReadPipeIfPossible Size
2020-06-11 22:37:50 +08:00
xperia64
c63797a096 Recomment the ffmpeg backend 2020-06-10 19:47:28 -04:00
xperia64
016d2b08e3 Fix ffmpeg time base 2020-06-10 19:42:23 -04:00
Pengfei Zhu
e6ad0d390e
Merge pull request #5381 from zhaowenlan1779/swkbd-another-fix
applets/swkbd: Properly handle button_text
2020-06-08 22:04:49 +08:00
xperia64
fd0a618b16 Fix ReadPipeIfPossible 2020-06-07 16:16:36 -04:00
Pengfei Zhu
edb5977fba
Merge pull request #5400 from lioncash/count
fs/file: Make use of std::move where applicable
2020-06-07 23:00:08 +08:00
Pengfei Zhu
1643cf5b86
Merge pull request #5398 from lioncash/call
am: Remove redundant c_str() calls
2020-06-07 22:57:40 +08:00
Pengfei Zhu
0b307a86a6
Merge pull request #5394 from lioncash/uninit
cro_helper: Silence -Wuninitialized warning
2020-06-07 22:53:06 +08:00
Lioncash
5259ab7566 fs/file: Make use of std::move where applicable
Avoids unnecessary atomic reference count increments and decrements.
2020-06-06 11:24:36 -04:00
Lioncash
d859f5c9eb am: Remove redundant c_str() calls
Avoids redundant std::string constructions.
2020-06-06 00:00:03 -04:00
Lioncash
9e515a50b7 cro_helper: Silence -Wuninitialized warning
We can simply initialize the variable in this case with a consistent
value.
2020-06-05 20:58:23 -04:00
Lioncash
f8ab6e9247 nwm: Eliminate signed conversion warnings
While we're at it, we can also improve some of the allocations and
copying that would be going on in one case by preallocating and then
emplacing before modifying.
2020-06-05 20:52:28 -04:00
Pengfei Zhu
81a1e5680f
Merge pull request #5163 from z87/input-touch-mapping
input: allow mapping buttons to touchscreen
2020-05-31 22:23:02 +08:00
zhupengfei
190a053987
applets/swkbd: Properly handle button_text
I'm not sure why we decided to have a boolean here, but apparently that wasn't the correct behaviour. According to HW tests, the Software Keyboard simply displays the default text when the button text provided is empty (**not necessarily all zero**). For example, if you set a text for one of the buttons and leave others empty, the button you set will have your text, while others will have their default texts. Removed the boolean and updated frontend code to make it correct.
2020-05-31 09:41:30 +08:00
xperia64
7dc472a3a7
Fix "core.cpp" clang-format (#5375) 2020-05-29 01:53:14 +02:00
Pengfei Zhu
61c8ea3fe9
Merge pull request #5333 from lioncash/heap
fs_user: std::move vectors where applicable
2020-05-28 22:49:57 +08:00
Ben
57aa18f52e
Improve core timing accuracy (#5257)
* Improve core timing accuracy

* remove wrong global_ticks, use biggest ticks over all cores for GetGlobalTicks

* merge max slice length change
2020-05-12 22:48:30 +02:00
Ben
007fb63e47
Merge pull request #5230 from B3n30/circumvent_apple_intel_hw_shader_issue
Add flag to disable seperable shaders for osx Intel GPUs.
2020-05-09 12:34:21 +02:00
Ben
8a69172570
Merge pull request #5231 from hamish-milne/fix-address-arbiter-serialization
Fix Address Arbiter serialization
2020-05-09 12:33:35 +02:00
Lioncash
ba2ae9616a fs_user: std::move vectors where applicable
Allows removing some allocation churn in some locations by moving
std::vectors into Path where applicable.
2020-05-04 12:07:57 -04:00
z87
41facaece3 input_common: add TouchFromButtonDevice 2020-05-04 13:51:37 +03:00
Mat M
e9819b61a6
service: Mark variables as [[maybe_unused]] where applicable (#5318)
Quite a few service functions are stubbed but still pop all their
arguments, which can lead to unused variable warnings.

We can mark the unused arguments with [[maybe_unused]] to silence these
warnings until a full implementation of these functions are made.
2020-05-04 12:22:33 +02:00
Mat M
6e48149ee1
fs/archive: Make use of std::make_shared where applicable (#5319)
Allows implementations to allocate the object and the shared_ptr control
block in one allocation instead of needing to do two separate
allocations.

Also looks much nicer to the reader.
2020-05-04 12:22:13 +02:00
Mat M
79536ddb11
service/cfg: Convert file-scope std::vector to std::array (#5320)
Same behavior, but without a static runtime constructor that needs to
run at program start.
2020-05-04 12:21:56 +02:00
Mat M
30414eeb4b
service/cfg: Make GenerateConsoleUniqueId() return a pair (#5321)
Same behavior, but allows the use of structured bindings.
2020-05-04 12:21:43 +02:00
Ben
2874401703
cfg-savegame: add DebugMode block (#5330) 2020-05-04 12:19:44 +02:00
Pengfei Zhu
60669a7dd8
swkbd: Fix a bug where clicking Cancel hangs the game (#5294)
* swkbd: Fix a bug where clicking Cancel hangs the game

The text is validated in `Finalize`. If the validation fails, an error is returned and the applet is not actually finalized. This can result in hangs.

This is usually not a problem as the frontend is expected to validate the text passed to `Finalize`. However, when the user clicked on `Cancel`, the text is ignored and the frontend won't do any validation. Therefore, we should skip the validation here as well.

Also fixed a potential data race. All these functions should now be called on the same thread

* Address review comments

Renamed the fields
Remove close button
2020-05-04 11:31:17 +02:00
Pengfei Zhu
41bff0e3b7
Merge pull request #5316 from lioncash/init
core: Resolve -Wreorder warnings
2020-05-02 15:42:31 +08:00
Lioncash
563a540dfd core: Resolve -Wreorder warnings
Ensures the initialization order matches the actual order that the class
member variables will be initialized in.
2020-05-01 23:32:46 -04:00
Lioncash
a32ad7f1f2 soc_u: Prevent undefined behavior with CTRPollFD
This class is memcpy-ed and memcpy has the requirement that data passed
to it must be trivially copyable, otherwise the behavior is undefined.

This is trivial to resolve as BitField was made trivially copyable a
while ago, so this explicit copy assignment operator isn't necessary.
2020-05-01 22:30:10 -04:00
Pengfei Zhu
70a43be714
Merge pull request #5306 from lioncash/view2
file-sys: Make use of std::string_view where applicable
2020-05-02 08:07:10 +08:00
Pengfei Zhu
8e7abecf7e
Merge pull request #5307 from lioncash/guard
file_sys/seed_db: Add missing include guard
2020-05-02 08:04:58 +08:00
Pengfei Zhu
5a008a74fa
Merge pull request #5304 from lioncash/layered
layered_fs: Mark functions as static where applicable
2020-05-02 08:02:35 +08:00
Pengfei Zhu
6907568034
Merge pull request #5309 from lioncash/dtor
applets: Make destructors virtual where applicable
2020-05-02 08:02:14 +08:00
Pengfei Zhu
59984df603
Merge pull request #5308 from lioncash/rsa
core/hw/rsa: Minor cleanup
2020-05-02 08:01:58 +08:00
Lioncash
89eeb64854 applets/swkbd: Make destructor virtual
Prevents undefined behavior when destroying a derived class through a
base class pointer.
2020-05-01 10:44:31 -04:00
Lioncash
aeb6a037ed applets/mii_selector: Make destructor virtual
Prevents undefined behavior when destroying derived classes through a
base class pointer.
2020-05-01 10:42:57 -04:00
Lioncash
3ab0701192 core/hw/rsa: Make GetSignature() a const member function
This doesn't directly modify instance state, so it can be made const.
2020-05-01 10:17:43 -04:00
Lioncash
c55e81b946 core/hw/rsa: Make operator bool explicit
Prevents error-prone implicit conversions to bool from occurring.
2020-05-01 10:14:50 -04:00
Lioncash
75bac1e514 core/hw/rsa: Take std::vector instances by value
Allows us to std::move them and allow calling code to eliminate copies
from occurring entirely.
2020-05-01 10:14:07 -04:00
Lioncash
98385b75d6 file_sys/seed_db: Add missing include guard
Prevents any potential inclusion errors from occurring.
2020-05-01 09:59:58 -04:00