Commit Graph

1723 Commits

Author SHA1 Message Date
SachinVin 2fc7def6f6
Merge pull request #5395 from lioncash/gsp
gsp_gpu: Resolve sign conversion warnings
2022-01-30 21:55:24 +05:30
liushuyu af24f75c18
externals: update httplib and libressl ...
* In older `httplib`, SSL connections were not handled correctly and
  will have issues with proxy servers. Also, keep alive directives were
  not available back then, which is probably necessary to implement
  HTTP_C service correctly.
* Another reason being `httplib` now requires OpenSSL 1.1+ API while
  LibreSSL 2.x provided OpenSSL 1.0 compatible API.
* The bundled LibreSSL has been updated to 3.2.2 so it now provides
  OpenSSL 1.1 compatible API now.
* Also the path hint has been added so that it will find the correct
  path to the CA certs on *nix systems.
* An option is provided so that *nix system distributions/providers can
  use their own SSL implementations when compiling Yuzu/Citra to
  (hopefully) complies with their maintenance guidelines.
* LURLParse is also removed since `httplib` can handle
  `scheme:host:port` string itself now.
2022-01-13 19:32:50 -07:00
bunnei 67f1e4111d
Merge pull request #5792 from vitor-k/username
service/frd: return cfg username on GetMyScreenName
2022-01-08 02:01:31 -08:00
Vitor Kiguchi f0fd776fa2 cfg: use a default subregion based on the country 2021-12-10 16:55:20 +01:00
Vitor Kiguchi 3e71d68b94 service/frd: don't use global system
address review comments + clang format
2021-07-07 16:45:13 -03:00
Pengfei Zhu 5241032fc5
Merge pull request #5382 from zhaowenlan1779/uds-2
service/nwm_uds: Various improvements/corrections
2021-06-22 20:40:18 +08:00
Vitor Kiguchi 6d99b5d332 service/frd: return cfg username on GetMyScreenName
as some games apparently use this for the multiplayer display name
2021-06-05 21:53:16 -03:00
Ben 7325f58763
NWM_UDS: implement disconnect_reason and EjectClient (#5331)
* NWM_UDS: Stub disconnect_reason and EjectClient

* addressed review comments

* fix additional semicolon

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

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2021-05-16 10:41:54 +02:00
Max Fedotov a2f34ea82b
gcc 11 compatibility fix (suggestion) (#5778)
Fixes missing include and runtime variable in offsetof

* gcc 11 compatibility fix

* Revert "gcc 11 compatibility fix"

This reverts commit bf5711d944bbdf7b5663ba4fec1b9066f16e2bb2.

* gcc 11 compatibility fix (with pointer math)

* Don't require pointers for framebuffer field math

* Code style fix (clang-format)
2021-05-10 22:10:29 -05:00
bunnei 9ff97270cf
Merge pull request #5501 from FearlessTobi/port-1064-3948
Port yuzu-emu/yuzu#1064 and yuzu-emu/yuzu#3948: Changes to Telemetry and CPU feature detection
2021-04-23 22:58:08 -07:00
bunnei 24086d05bb
Merge pull request #5471 from vitor-k/misc
Fix some warnings and some small changes
2021-04-23 22:54:00 -07:00
zhupengfei 113e0c7331
citra_qt: Rebuilt movie frontend
This is completely rebuilt, in order to allow setting author, displaying movie metadata, and toggling read-only mode.

The UX is changed to more closely match other emulators' behaviour. Now you can only record/play from start/reset (In the future, we might want to introduce 'record from savestate')

Also fixed a critical bug where movie file can be corrupted when ending the recording while game is still running.
2021-02-08 11:25:31 +08:00
Marshall Mohror 2539215f18
Merge pull request #5660 from FearlessTobi/port-5166
Port yuzu-emu/yuzu#5166: "core: Remove unnecessary enum casts in log calls"
2021-02-03 10:19:38 -06:00
xperia64 8df502a688
Implement APT command 0x0103 (#5478)
* WIP implement apt 0x0103

* Update src/core/hle/service/apt/apt.cpp

Co-authored-by: Pengfei Zhu <zhupf321@gmail.com>

* Names

Co-authored-by: Pengfei Zhu <zhupf321@gmail.com>
2021-01-26 15:27:52 -05:00
xperia64 e33677b021
Add 3D slider value to the HID shared page (#5676)
* Add 3D slider value to the HID shared page; Fixes MSet

* Use f32
2021-01-05 22:01:01 +01:00
Lioncash 10f440cb59 common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
2021-01-04 05:17:13 +01:00
xperia64 5f1eb7146d
Merge generic part of Android microphone changes (#5624) 2020-12-30 19:21:03 -05:00
FearlessTobi da908a9ed1 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-12-29 06:39:21 +01:00
Vitor Kiguchi 981a4611a4 Mark variables only used on trace logs as maybe_unused
Fixes some -Wunused-variable warnings
2020-12-06 16:03:24 -03:00
mnml 6f45b402e7
UDS: implement GetApplicationData (#5533) 2020-12-05 22:27:57 +01:00
zhupengfei 8f0aebcd4f
service/apt: Fix deliver arg hmac size 2020-11-28 08:52:35 +08:00
Pengfei Zhu 21fb9d63f4
service/apt: Implement Deliver Args (#5611)
* service/apt: Add GetModule and GetAppletManager

These will be used to retrieve and set deliver args across system resets (which are currently implemented as complete restarts)

* applet_manager: Implement DeliverArg

`flags` was added to `ApplicationJumpParameters` as flags 0x2 is handled differently from 0x0.

* service/apt: Add ReceiveDeliverArg, implement GetStartupArgument

Some based on guesses.

* Address review comments
2020-11-24 20:10:31 +01:00
Ben 182ffa4243
APT: implement Set and GetWirelessRebootInfo (#5328)
* APT: implement Set and GetWirelessRebootInfo

* make wireless_reboot_info a member of APT::Module

* Removed stubbed from log message
2020-11-23 15:52:35 +01:00
Pengfei Zhu 6a77547bde
Minor frontend fixes to savestates (#5430) 2020-09-03 00:04:23 +02:00
Tobias f6b543886c
Port yuzu-emu/yuzu#4528: "common: Make use of [[nodiscard]] where applicable" (#5535)
Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
2020-08-31 21:06:16 +02:00
Vitor Kiguchi a6efc7c1ee Separate the enums from cam/cam.h
The settings.h file doesn't actually need all of the definitions
on cam.h, only some of the enums. They can, therefore, be separated
into another file, which is included by settings.h instead.
The other changes are fixing files that included settings.h and
depended on indirect includes from includes of includes of cam.h
2020-08-19 01:45:57 -03:00
Ben 1722701c07
[WIP] NCCHContainer: support for partitions if container is NCSD (#5345)
* GetProgramLaunchInfo: improve to for 3ds files

* NCSD: allow to load other partitions

* fix typo

* Update src/core/hle/service/fs/fs_user.cpp

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

* Update src/core/hle/service/fs/fs_user.cpp

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

Co-authored-by: Marshall Mohror <mohror64@gmail.com>
Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2020-07-14 09:14:30 -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
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 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
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
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
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
Lioncash 9cff314abb service/ir: Remove erroneous forward declaration
This can be removed as it's not used. Even if it were however, it would
be an incorrect forward declaration, as ServiceManager exists within the
Service::SM namespace, not the top-level SM namespace.
2020-05-01 08:54:27 -04:00
Sebastian Valle 3597921ec5
Merge pull request #5235 from lioncash/move
ipc_helpers: Make PushStaticBuffer take std::vector by value
2020-04-19 21:51:52 -05:00
Ben 1856752b61
Merge pull request #5203 from Subv/apt_title_allowed
Services/APT: Implemented the IsTitleAllowed function.
2020-04-19 16:50:47 +02:00
Mat M 8014c67faa
service: Resolve trivially avoidable copies (#5237)
* am/am: Avoid redundant copy in GetProgramInfoFromCia()

We can just use a reference to the title metadata. Avoids copying
several data entries and std::vector instances that don't need to be
copied.

* hle/service: Avoid redundant copying of std::string

GetUserPath() returns the path as a reference, so we can make use of
said reference to avoid making copies.
2020-04-19 09:24:37 +02:00
Mat M e54b640e0b
nwm/nwm_uds: Avoid copying all elements in channel_data map where applicable (#5236)
By using a reference here, we avoid copying every single element in the
map, each of which contains a std::share_ptr and std::deque containing
std::vectors.
2020-04-19 07:57:57 +02:00
Lioncash 7eabcdf1c3 apt/applet_manager: std::move parameter in GlanceParameter()
Same behavior, minus a redundant copy.
2020-04-18 19:22:03 -04:00
Lioncash a6e37b48e9 ipc_helpers: Make PushStaticBuffer take std::vector by value
Allows interfaces to move the vector into the calls, avoiding any
reallocations.

Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
2020-04-18 19:17:11 -04:00
Hamish Milne 397bd1bb73
Fix MIC_U serialization and timing (#5223)
* Fix MIC_U serialization and timing

* Better sample rate conversion

* Actually should be every 15 samples

* Reduce rounding errors
2020-04-18 20:52:56 +02:00
Sebastian Valle 75c9784239
Services/APT: Implemented the GetCaptureInfo function. (#5194)
This one is similar to the ReceiveCaptureBufferInfo function except it doesn't clear the capture buffer, according to 3dbrew.

This function is used by the Home Menu
2020-04-18 20:48:09 +02:00
Subv 07f49e588e Services/APT: Implemented the IsTitleAllowed function.
The Home Menu uses this to determine whether it is allowed to launch an app (call StartApplication)

This is a no-op for us, we allow any and all titles to be launched. The official APT module holds a list of some forbidden titles like some versions of IronFall and Flipnote Studio 3D.
2020-04-18 00:26:08 -05:00
Pengfei Zhu 8967b403b9
Merge pull request #5196 from Subv/apt_sys_menu_arg
Services/APT: Implemented the Store/LoadSysMenuArg functions.
2020-04-18 13:24:10 +08:00
Pengfei Zhu 47829ee095
Merge pull request #5213 from Subv/fs_resource
Services/FS: Stubbed GetSdmcArchiveResource and GetNandArchiveResource.
2020-04-18 13:22:21 +08:00
Ben c605bb42db
Merge pull request #4908 from hamish-milne/feature/savestates-2
Save states
2020-04-17 21:52:51 +02:00
Hamish Milne 026a63bcf7
Merge pull request #5130 from B3n30/warn_if_cia_contend_is_encrypted
Show an error if CIA contend is encrypted
2020-04-17 00:09:36 +01:00
Hamish Milne d6c84227d8 Fixed NWM not responding 2020-04-16 20:44:25 +01:00
Hamish Milne 9cd669db84 Merge branch 'master' into feature/savestates-2 2020-04-16 19:03:49 +01:00
Subv 0d8c3ee1d3 Services/APT: Implemented the Store/LoadSysMenuArg functions.
They are called by the Home Menu during initialization.

These functions will not see much use until we actually implement application jumping and system rebooting. For now we just need them to prevent some unmapped reads in the Home Menu due to the static buffers not being properly set up.
2020-04-15 22:32:11 -05:00
Subv 783e7af5b2 Services/FS: Stubbed GetSdmcArchiveResource and GetNandArchiveResource.
Also rewritten how GetArchiveResource works so that they all use the same interface.
We should decide what to do with these at some point.

Related to #3131 and #3110
2020-04-15 16:52:55 -05:00
Valentin Vanelslande 263e5be78e
Fix Luigi's Mansion can't remove amiibo bug (#5200)
* Fix Luigi's Mansion can't remove amiibo bug
2020-04-14 14:33:49 +02:00
Hamish Milne 828f88d20a Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
Hamish Milne 19872b599b Fix button state not persisting between loads 2020-04-11 20:47:14 +01:00
Hamish Milne 34af0d3452 Attempt to fix network bug 2020-04-11 20:33:38 +01:00
Hamish Milne 3871d74bc2 Fix mic sharedmemory not being deallocated 2020-04-11 19:33:21 +01:00
Hamish Milne 3278a4d7ef Fix crashes when loading with cameras active 2020-04-10 14:02:18 +01:00
Hamish Milne f156fdd332 clang format fixes etc. 2020-03-31 18:27:33 +01:00
Hamish Milne 92640fc29c Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00
Hamish Milne 9bd189a155 More cleaning up 2020-03-29 19:07:56 +01:00
Hamish Milne 6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +01:00
Hamish Milne 04aa351c40 Code review - general gardening 2020-03-29 16:14:36 +01:00
Hamish Milne 8f164a16ce Review changes 2020-03-28 17:08:27 +00:00
Hamish Milne d92b3e9754 Code review changes - clarified HTTP serialization 2020-03-28 16:29:15 +00:00
FearlessTobi b4ac1c0559 citra_qt/system: Add N3DS mode checkbox and enable it by default 2020-03-28 16:49:35 +01:00
Hamish Milne 03379b2072 Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-03-28 12:46:24 +00:00
Hamish Milne 7049af744f Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-03-28 12:33:21 +00:00
Pengfei Zhu 3edc4a3055
service/ldr_ro: Fix CRO loading when the buffer contained multiple VM areas (#5125)
* vm_manager: Handle multiple areas in ChangeMemoryState

It is possible that a few areas have the same permisson and state, but with different backing pointers. Currently, this function assumes that only one continous area is found, but this is not always the case.

* service/ldr_ro: Handle multiple areas in VerifyBufferState

It is possible that the buffer passed from the game is made up of multiple areas with the same permisson and state but different backing pointers. Change the check to allow that.
2020-03-28 13:26:54 +01:00
Hamish Milne 5604613642 More merge fixes 2020-03-27 21:48:58 +00:00
Pengfei Zhu 25ebf03c35
Merge pull request #5120 from zhaowenlan1779/file-write
service/fs: Update file size on write
2020-03-22 01:00:31 +08:00
B3n30 ed51f06097 fix path usage in InstallCia 2020-03-17 13:40:58 +01:00
Ben 590099a17a
CFG: Let GetSystemModel report model based on Settings:is_new_3ds (#5104)
* CFG: Let GetSystemModel report model based on  Settings:is_new_3ds

* Always write ol3ds console model to cfg savegame
2020-03-16 20:05:06 +01:00
B3n30 1d92343344 fix more review comments 2020-03-15 19:00:26 +01:00
B3n30 2465fd423a fix review comments 2020-03-15 18:57:29 +01:00
B3n30 391580c658 fix clang-format 2020-03-15 18:50:52 +01:00
B3n30 ae4ba287d5 warn if cia contend is encrypted 2020-03-15 18:23:19 +01:00
Hamish Milne da3ab3d56e Merge branch 'master' into feature/savestates-2 2020-03-07 21:23:08 +00:00
zhupengfei fc251b32b0
service/fs: Update file size on write
The file's size is stored in FileSessionSlot and retrieved when the game calls GetSize. However, it is not updated when the file is written to, which can possibly change the file size. Therefore, this can cause GetSize to return incorrect results.
2020-03-05 14:50:08 +08:00
zhupengfei 28014496c6
Fix incorrect port_id use 2020-03-03 12:13:45 +08:00