Commit graph

9438 commits

Author SHA1 Message Date
Lioncash
0cc6eb3134 gsp_gpu: Mark REGS_BEGIN as constexpr
Same behavior, but more consistent with the already constexpr file-scope
variables.
2020-06-05 21:12:38 -04:00
Lioncash
a17027783f gsp_gpu: Resolve sign conversion warnings
Resolves numerous warnings about signed/unsigned conversion warnings.
2020-06-05 21:09:20 -04:00
Lioncash
37861326ce gsp_gpu: Mark GetUnusedThreadId() as const
This doesn't modify class state.
2020-06-05 21:05:22 -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
zhupengfei
b34ceb89c5
nwm_uds: Change ASSERT to LOG_ERROR
This might be caused by some packet/status delay within the enet protocol, or may be caused by our not properly handling disconnection. Anyway, this situation *can* happen, and we should not crash Citra for a non-critical error.
2020-06-04 23:06:10 +08:00
zhupengfei
9965ce6938
nwm_uds: Make sure client node information match host's
This change is not HW tested as I do not have 3 3DSes, but this should make sure that all the members of the network hold the same `node_info`, `nodes` and the bitmasks, etc.
2020-06-04 22:18:39 +08:00
zhupengfei
4918f86622
service/nwm_uds: Ensure consistency regarding node IDs
Previously, when connecting, the host was using the incorrect node_id to update `node_info`.

This is an attempt to fix tywald's problem with MH, reported on Discord a while ago. I'm not sure if this would actually fix that though.
2020-06-04 22:18:21 +08:00
xperia64
76253063a3
Merge pull request #5376 from xperia64/save_default_controls
Actually save the input when clearing/resetting to default
2020-05-31 16:27:55 -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
46e8c38395
Use attribute instead of comment 2020-05-31 10:47:46 +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
8d19e144cb Actually save the input when clearing/resetting to default 2020-05-28 20:03:29 -04: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
Weiyi Wang
028609d548
Merge pull request #5362 from SutandoTsukai181/swkbd
applets/swkbd: Fix button order received from button_text
2020-05-25 08:22:57 -04:00
SutandoTsukai181
9ed6762c59 Use fixed indices for button order
Apps always return 3 strings, even if there is no custom text, so the index should be constant for each button.
2020-05-24 21:45:23 +03:00
SutandoTsukai181
1255d94baa Remove empty strings from button_text before adding buttons 2020-05-24 19:50:08 +03:00
Pengfei Zhu
c4ba7b3626
Merge pull request #5356 from xperia64/cubeb_avoid_leak
Avoid leaking cubeb input stream
2020-05-22 22:04:14 +08:00
xperia64
21159dd83a clang-format, and avoid another potential leak 2020-05-21 21:05:03 -04:00
xperia64
f9750875e3 Avoid leaking the cubeb input stream 2020-05-21 20:34:00 -04:00
Mat M
51dfc46d3f
gl_rasterizer_cache: Trivial minor cleanups (#5295)
* gl_rasterizer_cache: Mark file-scope functions as static where applicable

Prevents -Wmissing-declaration warnings from occurring and also makes
these functions internally linked.

* gl_rasterizer_cache: Remove unused local std::string variable

Despite being unused, compilers are unable to completely remove any code
gen related to the construction and destruction of this variable, since
the destructor of std::string is non-trivial.

Thus, we can remove it to reduce a minor amount of unnecessary code
generation

* gl_rasterizer_cache: Mark hash implementation as noexcept

This shouldn't throw.

* gl_rasterizer_cache: Remove unused variable in ClearAll()

* gl_rasterizer_cache: Make use of const on references explicit

While declared as auto&, these actually behave as const auto& variables,
due to the constness of the container being iterated. We can make this
explicit for readability sake.

* gl_rasterizer_cache: Resolve truncation warnings

The size is forwarded to a std::memset call, which takes a std::size_t
as its size parameter, so we can just make this change to silence the
warnings.

* gl_rasterizer_cache: Resolve variable shadowing warnings

Prevents a -Wshadow warning from occurring.
2020-05-18 09:19:54 -05:00
Ben
213c956b7c
Merge pull request #5313 from FearlessTobi/port-3827
Port yuzu-emu/yuzu#3827: "Update cubeb to 616d773"
2020-05-13 18:29:29 +02:00
Ben
307b8f923b
Merge pull request #5224 from FearlessTobi/port-3630
Port yuzu-emu/yuzu#3630: "common/file_util: Allow access to files on network shares"
2020-05-13 18:28:01 +02:00
Tobias
63c86f2417
Port yuzu-emu/yuzu#3268: "GUI: Deadzone controls for sdl engine at configuration input" (#5174)
* GUI: Deadzone controls for sdl engine at configuration input

Co-Authored-By: CJ Bok <cjbok@users.noreply.github.com>

* configure_input: Use slider to edit modifier scale

Co-Authored-By: Kewlan <kewlan@users.noreply.github.com>

* Address minor review comment

Co-Authored-By: Kewlan <kewlan@users.noreply.github.com>

Co-authored-by: CJ Bok <cjbok@users.noreply.github.com>
Co-authored-by: Kewlan <kewlan@users.noreply.github.com>
2020-05-13 18:26:05 +02: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
z87
26a6f64418 address review comments 2020-05-11 17:05:05 +03:00
Ben
d11d600b61
Merge pull request #5225 from FearlessTobi/port-3672
Port yuzu-emu/yuzu#3672: "file_util: Early-exit in Write/ReadArray if specified lengths are zero"
2020-05-11 09:45:39 +02:00
Lioncash
6ed4431d8b file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.

A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.

While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
2020-05-11 01:58:13 +02:00
Vitor Kiguchi
01b9302a28 game_list: cleanup and clang format in AddPermDirPopup 2020-05-10 13:45:43 -03:00
Vitor Kiguchi
fbf24e3ca4 game_list: fix folder reordering 2020-05-09 23:44:41 -03:00
Vitor Kiguchi
950c032837 change gameListDir to hold an index instead of a raw pointer 2020-05-09 23:36:40 -03:00
Ben
8d27b0714d
Merge pull request #5335 from lioncash/nullopt
gl_shader_manager: Make use of std::nullopt where applicable
2020-05-09 12:36:23 +02:00
Ben
4892d37309
Merge pull request #5336 from lioncash/constexpr
gl_rasterizer_cache: Make use of if constexpr in MortonCopyTile()
2020-05-09 12:36:04 +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
Ben
96ebd53466
Merge pull request #5264 from lioncash/gen
gl_shader_gen: Make use of fmt where applicable
2020-05-09 12:28:57 +02:00
Ben
e959d44f00
Merge pull request #5262 from lioncash/fmt
gl_shader_decompiler: Make use of fmt with the decompiler
2020-05-09 12:28:34 +02:00
Lioncash
cd201cd60f gl_shader_gen: Make use of fmt where applicable
Avoids string churn and makes it significantly easier to read the shader
template strings that are being used as the basis for formatting.
2020-05-08 14:50:48 -04:00
z87
e792c3d90c citra_qt: remove incorrect style in the Dark theme
Property "overflow" isn't documented, and it makes Qt complain about an
unknown property in the terminal.
2020-05-08 20:04:05 +03:00
z87
09cba69b48 citra_qt: improve touchscreen mapping UI 2020-05-08 20:04:05 +03:00
Lioncash
38c8fecb81 gl_rasterizer_cache: Make use of if constexpr in MortonCopyTile()
A trivial change that allows compilers to more rigorously optimize out
code blocks that will never be executed in some scenarios.
2020-05-04 23:08:53 -04:00
Lioncash
f2a7fe05c3 gl_shader_manager: Make use of std::nullopt where applicable
Prevents the internal buffer in the std::optional from being zeroed out
unnecessarily and instead sets the validity byte only in some
implementations.

While we're at it, we can make use of std::move to eliminate unnecessary
heap reallocations from occurring.
2020-05-04 23:00:11 -04:00
Lioncash
016d43df98 gl_shader_decompiler: Make use of fmt with the decompiler
Allows us to avoid even more string churn by allowing the AddLine
function to make use of fmt formatting so the string is formatted all at
once instead of concatenating multiple strings.

This is similar to how yuzu's decompiler works, which I've made function
the same way in the past.
2020-05-04 22:40:33 -04: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
Dragios
841522f59c Try to fix executable path generated in CI 2020-05-04 22:35:20 +08:00
z87
41facaece3 input_common: add TouchFromButtonDevice 2020-05-04 13:51:37 +03:00
Vitor K
36809b2e2e
Small fixes to "Option to hide mouse on inactivity" (#5280)
* Menubar: fix mouse tracking bug

* citra_qt: Fix copy/paste error
2020-05-04 12:33:02 +02: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