Commit graph

3631 commits

Author SHA1 Message Date
Sönke Holz
dd5c41b5a6 network: GetCurrentIpConfigInfo: return host IP address
Service::NIFM::IGeneralService::GetCurrentIpConfigInfo currently hardcodes 192.168.1.100 as the IP address, which prevents LAN play from working correctly.
2021-08-07 02:17:02 +02:00
ameerj
156ea746a3 nvhost_nvdec_common: Remove BufferMap
This was mainly used to keep track of mapped buffers for later unmapping.  Since unmap is no longer implemented, this no longer seves a valuable purpose.
2021-08-06 20:11:12 -04:00
ameerj
cc8ac112fc nvhost_nvdec_common: Stub UnmapBuffer Ioctl
Skip unmapping nvdec buffers to avoid breaking the continuity of the VP9 reference frame addresses, and the risk of invalidating data before the async GPU thread is done with it.
2021-08-06 20:06:30 -04:00
Morph
f10dc35dd0 applet_swkbd: Include the null terminator in the buffer size calculation
Some games may interpret the read string as a null-terminated string instead of just reading the string up to buffer_size.
2021-08-04 22:32:09 -04:00
Morph
3b4d427993 service: set: Correct copy amount in GetAvailableLanguageCodes 2021-08-01 11:59:52 -04:00
bunnei
47f13a9df4
Merge pull request #6752 from Morph1984/pt-br
service: ns, set: Add PT_BR (Brazilian Portuguese)
2021-07-30 14:42:11 -07:00
Morph
ba3d230421 applet_swkbd: Correct string buffer size calculation
The buffer size here does not include the initial 8 bytes.
2021-07-30 02:19:04 -04:00
Morph
6ca8ed9e58 service: set: Correct 4.0.0 max_entries to 0x40 (64) instead of 17 2021-07-30 02:15:53 -04:00
Morph
21ff0a3d6e service: ns, set: Add PT_BR (Brazilian Portuguese) 2021-07-30 02:15:53 -04:00
Ameer J
23b3333f72
Merge pull request #6751 from Morph1984/languagecode
service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese
2021-07-29 14:41:03 -04:00
bunnei
5acf020389
Merge pull request #6742 from Morph1984/uuid
common: uuid: Return a lower-case hex string in Format
2021-07-29 09:37:15 -07:00
Morph
a6359fe9ae service: ns: Remove unused ns_language header 2021-07-27 08:59:26 -04:00
Morph
d7cd316a6c service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese 2021-07-27 08:54:41 -04:00
Morph
b9b48aee7d common: uuid: Return a lower-case hex string in Format 2021-07-26 23:54:59 -04:00
bunnei
d6c799494c
Merge pull request #6696 from ameerj/speed-limit-rename
general: Rename "Frame Limit" references to "Speed Limit"
2021-07-26 18:51:00 -07:00
bunnei
c09557acd8
Merge pull request #6697 from ameerj/fps-cap
config, nvflinger: Add FPS cap setting
2021-07-25 16:23:44 -07:00
ameerj
9dfbc9bdce general: Rename "Frame Limit" references to "Speed Limit"
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate.
This allows us to differentiate it from the fps unlocker setting.
2021-07-23 22:10:01 -04:00
ameerj
2c6e274b39 config, nvflinger: Add FPS cap setting
Allows finer tuning of the FPS limit.
2021-07-23 22:04:36 -04:00
bunnei
2656020608
Merge pull request #6551 from bunnei/improve-kernel-obj
Improve management of kernel objects
2021-07-23 21:23:56 -04:00
bunnei
346bfb6c47 hle: service: kernel_helpers: Remove unnecessary pragma once. 2021-07-20 18:54:56 -07:00
bunnei
185b19fd5b hle: service: nvdrv: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei
6c6e730e9a hle: service: hid: npad: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei
7bd020e030 hle: service: sm: Refactor to better manage ports. 2021-07-20 18:54:55 -07:00
bunnei
015058fadf hle: service: Add a helper module for managing kernel objects. 2021-07-20 18:54:55 -07:00
Morph
9b7e57f3f4 applet_controller: Add preliminary support for version 8
Version 8 adds support for key remapping introduced in FW 11.0, we will not be implementing this for now.
2021-07-20 01:45:19 -04:00
Fernando S
da4ca4f2f9
Merge pull request #6525 from ameerj/nvdec-fixes
nvdec: Fix Submit Ioctl data source, vic frame dimension computations
2021-07-15 15:17:50 +02:00
Morph
0d88a2bc05 applets/web: Resolve Nintendo CDN URLs
This fixes the hint videos in New Super Mario Bros. U Deluxe
2021-07-15 00:31:46 -04:00
ameerj
8943f2158d nvhost_nvdec_common: Read Submit ioctl data from object addr
Fixes Mario Golf intro video decoding.
2021-07-14 23:56:24 -04:00
ameerj
3f601ed8bc nvhost_nvdec_common: Fix {Slice/Write}Vectors return
Plus some minor cleanup for consistency.
2021-07-14 22:30:58 -04:00
Morph
c6d7da88c7 service: Append service name prefix to common filenames 2021-07-14 02:09:14 -04:00
Morph
79824d7d1b applets: Append applet_ prefix to backend applets 2021-07-14 01:07:09 -04:00
Ameer J
f2599534f8
Merge pull request #6599 from german77/disable_rumble
npad: Disable vibration check if disabled
2021-07-13 16:11:59 -04:00
ReinUsesLisp
69214ef678 boxcat: Silence -Wmaybe-uninitialized in httplib.h 2021-07-12 03:30:45 -03:00
german77
ed5f1a45b7 npad: Disable vibration check if disabled 2021-07-10 20:06:07 -05:00
Ameer J
5edc96f4a4
Merge pull request #6539 from lat9nq/default-setting
general: Move most settings' defaults and labels into their definition
2021-07-08 14:46:31 -04:00
Kelebek1
b9f915e07a Report 2 channels active. Fixes Tales of Vesperia's mono channel audio. 2021-07-06 18:52:49 +01:00
Morph
5dfa313d2c service: mii: Retrieve the correct default miis.
We were including the first 2 default miis which are not meant to be shown in games. With this change, we properly retrieve the 6 default miis shown in games, with 3 of each gender.
2021-07-04 05:38:34 -04:00
bunnei
2fc0a760f0
Merge pull request #6498 from Kelebek1/Audio
[audio_core] Decouple audio update and processing, and process at variable rate
2021-07-03 00:24:33 -07:00
Kelebek1
b455043e45 Fix XC2/VOEZ crashing, add audio looping and a few misc fixes 2021-07-01 06:01:01 +01:00
lat9nq
0e5c74bc9e core, input_common: Miscellaneous fixes
bcat: Fix settings access

telemetry_session: Fix settings accesses

So this is what I get for testing with the web service disabled.

touch_from_button: Fix settings access for clang
2021-06-28 20:56:17 -04:00
lat9nq
b91b76df4f general: Make most settings a BasicSetting
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.

Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
2021-06-28 17:32:17 -04:00
Morph
6ac978426c filesystem: Open a read-only directory for SDMC mods
This prevents mod files from being locked due to the read-only share flag in Windows.
2021-06-28 10:08:08 -04:00
lat9nq
844e0114b0 core: Simplify SDMC mod loading
If someone else wants to support other mod formats in the SDMC
directory, that can be added later. For now, just allow RomFS modding
here and force people to do other types of mods the old way.

Addresses review comments.

Co-authored-by: LC <mathew1800@gmail.com>
2021-06-28 10:08:08 -04:00
lat9nq
1664c74a6c core: Support LayeredFS mod from SDMC directory
Enables loading a mod directly from `[yuzu data
directory]/sdmc/atmosphere/contents/[title_id]`. For use with some
homebrew mod managers.
2021-06-28 10:08:07 -04:00
Kelebek1
0857d6a3db Decouple audio processing and run at variable rate
Currently, processing of audio samples is called from AudioRenderer's Update method, using a fixed 4 buffers to process the given samples. Games call Update at variable rates, depending on framerate and/or sample count, which causes inconsistency in audio processing. From what I've seen, 60 FPS games update every ~0.004s, but 30 FPS/160 sample games update somewhere between 0.02 and 0.04, 5-10x slower. Not enough samples get fed to the backend, leading to a lot of audio skipping.

This PR seeks to address this by de-coupling the audio consumption and the audio update. Update remains the same without calling for buffer queuing, and the consume now schedules itself to run based on the sample rate and count.
2021-06-27 15:58:07 +01:00
bunnei
36d581ec73 hle: service: hwopus: OpenHardwareOpusDecoderEx: Remove unused buffer size. 2021-06-26 00:38:08 -07:00
bunnei
3565e32f4d hle: service: hwopus: Implement GetWorkBufferSizeEx and OpenHardwareOpusDecoderEx.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:25:37 -07:00
bunnei
d1ba4a2db2 hle: service: aoc: Stub GetAddOnContentListChangedEventWithProcessId.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:22:53 -07:00
bunnei
4dc2f5a341
Merge pull request #6522 from Morph1984/pragma
general: Add missing #pragma once directives
2021-06-24 08:53:27 -07:00
Morph
eed0d1f33b general: Add missing #pragma once directives 2021-06-24 07:20:57 -04:00
Chloe
f216a9432b
Add missing includes (#6521)
* Add missing includes

* Add array
2021-06-24 03:24:17 -04:00
bunnei
1b09d6628b
Merge pull request #6517 from lioncash/fmtlib
externals: Update fmt to 8.0.0
2021-06-23 15:31:04 -07:00
bunnei
809e5fd523
Merge pull request #6504 from Kelebek1/samples-played
[audout] Implement GetAudioOutPlayedSampleCount
2021-06-23 11:31:12 -07:00
Lioncash
d0b1f2bd05 General: Resolve fmt specifiers to adhere to 8.0.0 API where applicable
Also removes some deprecated API usages.
2021-06-23 13:48:21 -04:00
Mai M
4ec7d79174
Merge pull request #6510 from ReinUsesLisp/npad-data-race
npad: Fix data race when updating devices
2021-06-22 22:17:57 -04:00
bunnei
0308a2679e
Merge pull request #6493 from Morph1984/fs-nodiscard
common: fs: Miscellaneous changes
2021-06-22 17:21:59 -07:00
bunnei
255f8d22d7
Merge pull request #6472 from Morph1984/spl
service: spl: Implement general SPL service
2021-06-22 15:43:10 -07:00
bunnei
791d3d1bea
Merge pull request #6483 from Morph1984/get-tz-file
service: time: Use GetFileRelative to get files within subdirectories
2021-06-22 14:25:41 -07:00
Morph
81b1b71993 common: fs: Remove [[nodiscard]] attribute on Remove* functions
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal.

As such, removing the [[nodiscard]] attribute is best for these functions.
2021-06-22 13:36:24 -04:00
Rodrigo Locatti
15cc561d12 npad: Fix data race when updating devices
Add a lock to avoid data races.
This reduces the number of -fsanitize=thread errors significantly.
2021-06-22 03:16:21 -03:00
Kelebek1
ba3af04da1 Implement audout GetAudioOutPlayedSampleCount
Used in Ninja Gaiden games.
2021-06-22 04:39:17 +01:00
Morph
fd5ef1970c service: time: Use GetFileRelative to get files within subdirectories
The timezone info file can be within subdirectories (such as Asia/Tokyo), use GetFileRelative instead of GetFile to get files within subdirectories.
2021-06-18 11:25:26 -04:00
ameerj
3522fc019c nvflinger: Add toggle to disable buffer swap interval limits
Enabling this setting will allow some titles to present more frames to
the screen as they become available in the nvflinger buffer queue.
2021-06-17 01:41:56 -04:00
Morph
4a4e304319 spl: Mark the other functions as unimplemented 2021-06-16 01:46:45 -04:00
Morph
8ba83c4c2a spl: Implement spl::GetConfig 2021-06-16 01:46:45 -04:00
Morph
ded36b8688 spl: Add the general SPL interface 2021-06-16 01:46:45 -04:00
Morph
faf11fe46d spl: Add SPL types 2021-06-16 01:46:45 -04:00
Morph
95f203b7c7 spl: Add SPL result codes 2021-06-16 01:07:58 -04:00
Morph
0f48292de1 fsp_srv: Fix filesystem access logging
This introduces a new setting Enable FS Access Log which saves the filesystem access log to sdmc:/FsAccessLog.txt

If this setting is not enabled, this will indicate to FS to not call OutputAccessLogToSdCard.

Fixes softlocks during loading in Xenoblade Chronicles 2 when certain DLC is enabled.
2021-06-16 00:06:02 -04:00
ameerj
422a15ee75 lm: Demote guest logs to LOG_DEBUG
Guest logs are not very useful, as they are intended for use by the game developers during development. As such, they provide little meaning to be logged by yuzu and tend to overwhelm the log output at times.
2021-06-14 22:23:27 -04:00
Morph
a4454329c1 general: Remove extraneous includes 2021-06-13 11:32:43 -04:00
german77
827483409b hid: Stub IsFirmwareUpdateAvailableForSixAxisSensor 2021-06-11 14:44:46 -05:00
bunnei
781c85b951 hle: service: sm: Remove redundant session reservation, etc.
- We were double-reserving, causing us to run out of sessions in Pokemon Sword & Shield.
2021-06-10 11:34:41 -07:00
bunnei
fa8a0065ca
hle: service: Increase arbitrary max sessions limit.
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-10 00:08:09 -07:00
bunnei
ec5674a6ad hle: service: sm: Fix GetService setup of session & port. 2021-06-09 22:29:18 -07:00
bunnei
2aa6a8d889 hle: service: Use correct size for ServerSessionCountMax. 2021-06-09 22:04:36 -07:00
bunnei
b2971b48ed hle: kernel: KServerSession: Fix client disconnected.
- Prevents a cloned session's handler from being overwritten by another disconnected session.
- Fixes session handler nullptr asserts with Pokemon Sword & Shield.
2021-06-09 21:37:11 -07:00
bunnei
2d32fc2318
hle: service: Increase arbitrary max sessions limit.
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-09 11:59:34 -07:00
bunnei
27ce97fd42 hle: kernel: Refactor to allocate a ServiceThread per service handler.
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject.
- This results in race conditions with N sessions queuing requests to the same service interface.
- Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
2021-06-04 19:26:48 -07:00
Morph
b840dd9af8 fsp-srv: Replace one last instance of RESULT_SUCCESS 2021-06-02 21:40:14 -04:00
Chloe
c4c256f56a
fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
2021-06-02 17:46:29 -07:00
Morph
a0e4c2e1fc general: Replace RESULT_UNKNOWN with ResultUnknown
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
Morph
12c1766997 general: Replace RESULT_SUCCESS with ResultSuccess
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
bunnei
a5ebba7e36
Merge pull request #6377 from lioncash/point
common: Extract Point struct into common
2021-05-30 01:35:26 -07:00
Mai M
2069430baa
Merge pull request #6374 from Morph1984/swkbd-textcheck-encoding
applets/swkbd: Only read the text check message on Failure/Confirm
2021-05-29 23:34:40 -04:00
Mai M
fc708b396b
Merge pull request #6364 from german77/stub-lp2p
ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService

Mario Kart Live: Home Circuit needs lp2p:sys lp2p:app INetworkServiceMonitor INetworkService to be able to progress.

Note: The game still fails to boot from unimplemented LDN and BSD services.
2021-05-29 23:33:57 -04:00
bunnei
945effcc75
Merge pull request #6356 from ogniK5377/ApplyNpadSystemCommonPolicy
hid: ApplyNpadSystemCommonPolicy
2021-05-28 10:05:20 -07:00
Lioncash
5554de3933 touchscreen: Make use of common point struct 2021-05-28 08:15:22 -04:00
Lioncash
8171ad65cd common: Extract point into a common struct
This is generic enough that it can be moved into the Common class for
reuse.
2021-05-28 08:12:49 -04:00
Morph
c68255f70f applets/swkbd: Make use of std::move where applicable
Avoids redundant string copies
2021-05-27 23:45:56 -04:00
Morph
247cd92216 applets/swkbd: Only read the text check message on Failure/Confirm
Applications may leave this region of memory uninitialized when the text check result is not either Failure or Confirm.
Attempting to read uninitialized memory may cause an exception within the UTF16 to UTF8 string converter.
Fix this by only reading the text check message on Failure or Confirm.
2021-05-27 23:45:56 -04:00
german77
65e20f424a ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService 2021-05-26 10:06:00 -05:00
Morph
02169406be
Merge pull request #6331 from lioncash/gesture
hid/gesture: Simplify point related code
2021-05-26 09:19:00 -04:00
Morph
065867e2c2
common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)
* common: fs: fs_types: Create filesystem types

Contains various filesystem types used by the Common::FS library

* common: fs: fs_util: Add std::string to std::u8string conversion utility

* common: fs: path_util: Add utlity functions for paths

Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library

* common: fs: file: Rewrite the IOFile implementation

* common: fs: Reimplement Common::FS library using std::filesystem

* common: fs: fs_paths: Add fs_paths to replace common_paths

* common: fs: path_util: Add the rest of the path functions

* common: Remove the previous Common::FS implementation

* general: Remove unused fs includes

* string_util: Remove unused function and include

* nvidia_flags: Migrate to the new Common::FS library

* settings: Migrate to the new Common::FS library

* logging: backend: Migrate to the new Common::FS library

* core: Migrate to the new Common::FS library

* perf_stats: Migrate to the new Common::FS library

* reporter: Migrate to the new Common::FS library

* telemetry_session: Migrate to the new Common::FS library

* key_manager: Migrate to the new Common::FS library

* bis_factory: Migrate to the new Common::FS library

* registered_cache: Migrate to the new Common::FS library

* xts_archive: Migrate to the new Common::FS library

* service: acc: Migrate to the new Common::FS library

* applets/profile: Migrate to the new Common::FS library

* applets/web: Migrate to the new Common::FS library

* service: filesystem: Migrate to the new Common::FS library

* loader: Migrate to the new Common::FS library

* gl_shader_disk_cache: Migrate to the new Common::FS library

* nsight_aftermath_tracker: Migrate to the new Common::FS library

* vulkan_library: Migrate to the new Common::FS library

* configure_debug: Migrate to the new Common::FS library

* game_list_worker: Migrate to the new Common::FS library

* config: Migrate to the new Common::FS library

* configure_filesystem: Migrate to the new Common::FS library

* configure_per_game_addons: Migrate to the new Common::FS library

* configure_profile_manager: Migrate to the new Common::FS library

* configure_ui: Migrate to the new Common::FS library

* input_profiles: Migrate to the new Common::FS library

* yuzu_cmd: config: Migrate to the new Common::FS library

* yuzu_cmd: Migrate to the new Common::FS library

* vfs_real: Migrate to the new Common::FS library

* vfs: Migrate to the new Common::FS library

* vfs_libzip: Migrate to the new Common::FS library

* service: bcat: Migrate to the new Common::FS library

* yuzu: main: Migrate to the new Common::FS library

* vfs_real: Delete the contents of an existing file in CreateFile

Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.

* input_profiles: Don't iterate the input profile dir if it does not exist

Silences an error produced in the log if the directory does not exist.

* game_list_worker: Skip parsing file if the returned VfsFile is nullptr

Prevents crashes in GetLoader when the virtual file is nullptr

* common: fs: Validate paths for path length

* service: filesystem: Open the mod load directory as read only
2021-05-25 19:32:56 -04:00
Chloe Marcec
db7abfecdd hid: ApplyNpadSystemCommonPolicy
We already do this specifically for homebrew, so we can keep it stubbed out for the time being
2021-05-24 15:07:47 +10:00
bunnei
7361eac10f hle: kernel: Implement CloneCurrentObject and improve session management. 2021-05-20 21:41:49 -07:00
bunnei
c40e7593f5 Revert "WORKAROUND: temp. disable session resource limits while we work out issues"
This reverts commit fc086f93b2.
2021-05-20 21:40:30 -07:00
bunnei
7d86a6ff02
Merge pull request #6317 from ameerj/fps-fix
perf_stats: Rework FPS counter to be more accurate
2021-05-18 19:56:29 -07:00
Lioncash
44556dc21a hid/gesture: Factor out last gesture retrieval into its own function
Deduplicates a commonly repeated expression.
2021-05-18 03:59:44 -04:00
Lioncash
a9d8e24e47 hid/gesture: Ensure all ID arrays are initialized
Makes for deterministic initial state.
2021-05-18 03:39:21 -04:00
Lioncash
74f30c0223 hid/gesture: Make Point a template
We can now use this in a generic context to reuse it with the finger
position.
2021-05-18 03:39:18 -04:00
Lioncash
20699e90fa hid/gesture: Replace x,y members of GestureState with a Point
Simplifies assignments.
2021-05-18 03:32:42 -04:00
Lioncash
2f1ef3910b hid/gesture: Add default comparators to Point
Simplifies some comparisons.
2021-05-18 03:32:42 -04:00
Lioncash
60831eabd9 hid/gesture: Rename Points to Point
This only represents a single point
2021-05-18 03:32:38 -04:00
bunnei
d5131805ce
Merge pull request #6284 from ameerj/shantae-fix
nvflinger: Create layers when they are queried but not found
2021-05-16 01:45:14 -07:00
bunnei
ad6e20cfde
Merge pull request #6296 from lioncash/shadow-error
core: Make variable shadowing a compile-time error
2021-05-16 01:35:46 -07:00
bunnei
e8d2de1f99
Merge pull request #6307 from Morph1984/fix-response-push-size
nifm, ssl: Fix incorrect response sizes
2021-05-16 01:32:04 -07:00
Lioncash
9a07ed53eb core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
2021-05-16 03:43:16 -04:00
bunnei
5a2b15bf75
Merge pull request #6299 from bunnei/ipc-improvements
Various improvements to IPC and session management
2021-05-15 22:30:21 -07:00
Morph
faaea00069 nifm, ssl: Fix incorrect response sizes 2021-05-16 00:20:48 -04:00
ameerj
5bef54618a perf_stats: Rework FPS counter to be more accurate
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case.

This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics.
The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values.

The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-15 20:34:20 -04:00
Morph
271f2e2d78 ssl: Stub Import(Client/Server)Pki
- Used in JUMP FORCE Deluxe Edition
2021-05-12 21:04:13 -04:00
Morph
5a042bdaa1
Merge pull request #6267 from german77/gestureRewrite
hid: Improve hardware accuracy of gestures
2021-05-12 09:17:23 -04:00
bunnei
fc086f93b2 WORKAROUND: temp. disable session resource limits while we work out issues 2021-05-11 10:51:39 -07:00
bunnei
b9f543b29f audren 2021-05-11 10:24:53 -07:00
bunnei
2c1e119c4a hle: service: sm: Add TIPC support.
- Fixes our error checking of names as well.
2021-05-10 20:34:38 -07:00
bunnei
49c4c329f6 hle: service: sm: GetService: Reserve session resource when we create a KSession. 2021-05-10 20:34:38 -07:00
bunnei
21671d05a3 hle: service: Add support for dispatching TIPC requests. 2021-05-10 20:34:38 -07:00
bunnei
da25a59866 hle: service: Implement IPC::CommandType::Close.
- This was not actually closing sessions before.
2021-05-10 20:34:38 -07:00
bunnei
41928dfdda hle: service: sm: Use RegisterNamedService to register the service. 2021-05-10 20:34:38 -07:00
bunnei
934b2d8842 hle: service: sm: Improve Initialize implementation. 2021-05-10 20:34:38 -07:00
bunnei
c6de9657be hle: kernel: Implement named service ports using service interface factory.
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
2021-05-10 20:34:38 -07:00
bunnei
44c763f9c6 hle: kernel: KSession: Improve implementation of CloneCurrentObject. 2021-05-10 20:33:53 -07:00
bunnei
cfed6936f3 hle: service: sm: Increase point buffer size. 2021-05-10 15:43:42 -07:00
bunnei
faa067f175
Merge pull request #6266 from bunnei/kautoobject-refactor
Kernel Rework: Migrate kernel objects to KAutoObject
2021-05-07 23:30:17 -07:00
bunnei
8acf739b3f
Merge pull request #6287 from lioncash/ldr-copy
ldr: Simplify memory copy within LoadNro()
2021-05-07 09:46:31 -07:00
Lioncash
8f638e81e9 ldr: Simplify memory copy within LoadNro()
We can use the dedicated memory function for performing copies instead
of reading into a temporary buffer and then immediately writing it back
out to memory.

Eliminates a bit of heap memory churn.
2021-05-06 19:18:14 -04:00
ameerj
da62e92784 nvflinger: Create layers when they are queried but not found
Fixes Shantae softlock on boot.
2021-05-06 11:20:52 -04:00
bunnei
d2c4dbde9e fixup! hle: kernel: Migrate KSharedMemory to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei
510f71d871 fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei
9f81221528 fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei
d3c166d4d5 common: Rename NON_COPYABLE/NON_MOVABLE with YUZU_ prefix. 2021-05-05 16:40:53 -07:00
bunnei
2a7eff57a8 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -07:00
bunnei
bf380b8584 hle: kernel: Remove deprecated Object class. 2021-05-05 16:40:52 -07:00
bunnei
626f746971 hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei
7a06864100 hle: kernel: Migrate KServerPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei
0297448fbc hle: kernel: Migrate KClientPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei
c7d8b7421c hle: kernel: Migrate KTransferMemory to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei
7444963bbb hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei
2e8d6fe9a0 hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei
89edbe8aa2 hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps. 2021-05-05 16:40:51 -07:00
bunnei
ab704acab8 hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:51 -07:00
bunnei
addc0bf037 hle: kernel: Migrate KEvent to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
086db71e94 hle: kernel: Migrate KSharedMemory to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
7ccbdd4d8d hle: kernel: Migrate KProcess to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei
5e5933256b hle: kernel: Refactor IPC interfaces to not use std::shared_ptr. 2021-05-05 16:40:50 -07:00
bunnei
34bed1ab41 hle: kernel: Refactor out various KThread std::shared_ptr usage. 2021-05-05 16:40:50 -07:00
bunnei
260b841dc3
Merge pull request #6279 from ogniK5377/nvhost-prof
nvdrv: /dev/nvhost-prof-gpu for production
2021-05-05 16:16:13 -07:00
bunnei
0b7a03bd65
Update src/core/hle/service/nvdrv/interface.cpp
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-05 16:16:02 -07:00
german77
8c30ed6d09 hid: Improve hardware accuracy of gestures 2021-05-05 10:13:09 -05:00
Lioncash
cc47a6a9c2 service: Remove unused class variables
Prevents some warnings from occurring.
2021-05-05 01:32:28 -04:00
Lioncash
9e726a9250 service: Resolve cases of member field shadowing
Now all that remains is for kernel code to be 'shadow-free' and then
-Wshadow can be turned into an error.
2021-05-04 04:38:38 -04:00
Chloe Marcec
7d257ce7bd nvdrv: /dev/nvhost-prof-gpu for production
While we're at it, we can fix the is_initialized error code.
This fixes the crashes on Shante
2021-05-03 14:39:03 +10:00
german77
08d5bd36d8 hid: Fix touch not initializing properly if disabled 2021-05-02 21:27:15 -05:00
bunnei
01a57d4c8d
Merge pull request #6265 from Morph1984/snap-save-fix
service: filesystem: Return proper error codes for CreateFile
2021-05-02 00:45:18 -07:00
Morph
72b22fd433 service: filesystem: Return proper error codes for CreateFile
This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists).

This fixes saving and the loading of existing saves in New Pokemon Snap
2021-05-01 09:33:00 -04:00
german77
1ed1dd3c89 Disable touch if setting is not enabled 2021-04-30 19:28:21 -05:00
bunnei
922b0d9933
Merge pull request #6226 from german77/sevensix
hid: Implement SevenSixAxis and ConsoleSixAxisSensor
2021-04-29 22:06:57 -07:00
german77
cfdec68d5a address comments 2021-04-26 22:07:16 -05:00
Lioncash
dcb91ca4a4 service: Eliminate cases of member shadowing
Resolves a few localized instances of member variable shadowing. Brings
us a little closer to turning shadowing warnings into errors.
2021-04-26 09:39:49 -04:00
ameerj
75e0d16caa nvhost_vic: Fix device closure
Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation.

Also cleans up some of the surrounding code.
2021-04-24 19:22:09 -04:00
Mat M
4c8c5ad1b6
Merge pull request #6234 from Morph1984/stub-am
ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
2021-04-24 12:37:34 -04:00
Mat M
98fb36cb0a
Merge pull request #6235 from german77/ectx_aw
glue: Add ectx:aw service placeholder
2021-04-24 12:37:12 -04:00
german77
a02c4686c3 glue: Add ectx:aw placeholder 2021-04-24 10:50:25 -05:00
german77
c19ad21ae8 hid: Implement SevenSixAxis and ConsoleSixAxisSensor 2021-04-23 22:12:41 -05:00
Morph
04d9c27120 ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
- Used by Pixel Game Maker Series Werewolf Princess Kaguya
2021-04-23 23:04:22 -04:00
bunnei
4cc8ab8a86
Merge pull request #6228 from lioncash/semi
lm: Resolve -Wextra-semi warning
2021-04-23 19:59:20 -07:00
bunnei
2e268abe42
Merge pull request #6229 from lioncash/unused-var
acc/lbl: Remove unused variables
2021-04-23 15:48:47 -07:00
Lioncash
502f3cef87 acc/lbl: Remove unused variables 2021-04-23 09:39:56 -04:00
Lioncash
29cd40bded lm: Make use of insert_or_assign() in Log()
Avoids unnecessary default construction of an entry in cases where no
entry exists before overwriting the created entry.
2021-04-23 09:27:18 -04:00
Lioncash
5ba49f188b lm: Prevent redundant map lookups in Log()
We can perform the lookup and then do the contains check by checking the
end iterator. The benefit of this is that if we *do* find an entry, then
we aren't hashing into the map again to find it.

We can also get rid of an unused std::vector temporary while we're at
it.
2021-04-23 09:24:21 -04:00
Lioncash
6e2040c955 lm: Resolve -Wextra-semi warning
Resolves a trivial warning with clang.
2021-04-23 09:20:54 -04:00
Morph
86278f5db2 service: hid: Get transfer memory for InitializeSevenSixAxisSensor 2021-04-22 05:50:46 -04:00
bunnei
f0c2190ceb
Merge pull request #6214 from Morph1984/time-fix-kirby-clash
time: Fix GetClockSnapshotFromSystemClockContext
2021-04-21 11:17:58 -07:00
bunnei
17704271f4
Merge pull request #6217 from Morph1984/consistent-writebuffers
general: Write buffers before pushing raw arguments
2021-04-19 20:54:25 -07:00
bunnei
e5e9bee1cc
Merge pull request #6215 from lioncash/duplicate
npad: Remove duplicated class member variable
2021-04-19 18:12:48 -07:00
Morph
27eeb20001 general: Write buffers before pushing raw arguments
For consistency with the rest of the service implementations
2021-04-19 12:45:50 -04:00
Lioncash
9f39f7c041 arp: Use type alias for issue function
Reduces some verbosity and centralizes the function details in one spot.
2021-04-19 12:36:10 -04:00
Lioncash
b7d04d848d arp: Prevent uninitialized read of launch member variable
If anything happened to call arp functions in the wrong order and called
IRegistrar's Issue function before SetApplicationLaunchProperty, we'd
read from an uninitialized ApplicationLaunchProperty instance.

Instead, we can always initialize it so if this does happen, then the
outcome of doing such a thing is at least consistently reproducible.
2021-04-19 12:30:34 -04:00
Lioncash
39497183a6 npad: Remove duplicated class member variable
ControllerBase already has a System reference that can be accessed from
this class, so we can get rid of this to make the class layout a little
more straightforward.
2021-04-19 12:23:28 -04:00
Morph
8285776603 time: Write buffer before pushing RESULT_SUCCESS in GetClockSnapshot 2021-04-19 12:09:28 -04:00
Morph
a223006c50 time: Fix GetClockSnapshotFromSystemClockContext
This removes an incorrect alignment usage and corrects the positions of the popped parameters.

- Fixes Super Kirby Clash crashing on boot
2021-04-19 11:17:47 -04:00
Morph
51ca93981d applets: Send focus state change message on applet state change
Fixes the softlock after the controller applet exits in Mario Kart 8 Deluxe.
2021-04-17 09:26:48 -04:00
Morph
ba2c917842 applets: Make the applet mode a protected property of Applet 2021-04-17 08:50:49 -04:00
bunnei
9ad77ba6d3
Merge pull request #6125 from ogniK5377/nvdec-close-dev
nvdrv: Cleanup CDMA Processor on device closure
2021-04-16 23:14:44 -07:00
Morph
5bc9f15c6d applets/swkbd: Implement the Normal and Inline Software Keyboard Applet 2021-04-15 01:53:17 -04:00
Morph
a8c09cd5e4 ILibraryAppletCreator: Implement CreateHandleStorage
Used by Monster Hunter Generations Ultimate
2021-04-15 01:53:16 -04:00
Morph
0a40106cf1 ILibraryAppletAccessor: Demote from ERROR to DEBUG for null storage logs
Avoids unnecessary console spam when the inline software keyboard is used.
2021-04-15 01:53:16 -04:00
Morph
d1e40dd244 applets: Pass in the LibraryAppletMode each applet's constructor 2021-04-15 01:53:16 -04:00
Morph
0f40c8c634 applets: Remove the previous software keyboard applet implementation 2021-04-15 01:53:16 -04:00
bunnei
a4c6712a4b common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
bunnei
0c19147e09
Merge pull request #6170 from Morph1984/more-time-fixes
service: time: Setup the network clock with the local clock context
2021-04-11 10:50:08 -07:00
bunnei
4f60818eae
Merge pull request #6167 from Morph1984/time-fix
service: time: Fix CalculateStandardUserSystemClockDifferenceByUser
2021-04-10 22:11:53 -07:00
bunnei
290b452ea1
Merge pull request #6112 from ogniK5377/pctl
pctl: Rework how pctl works to be more accurate
2021-04-10 21:09:54 -07:00
bunnei
31c80b8c6f
Merge pull request #6171 from german77/services
service: Update service function tables and use proper names
2021-04-09 22:47:34 -07:00
bunnei
9cf8bcc75c
Merge pull request #6113 from german77/playhistory
Friend: Stub GetPlayHistoryRegistrationKey
2021-04-09 20:50:13 -07:00
bunnei
96d07b4949
Merge pull request #6158 from german77/hidServiceTables
hid: Update service function tables
2021-04-09 16:10:06 -07:00
Morph
9c85bcbecc ns: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
467ef54e2a aoc_u: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
8a9e834fc2 nim: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
e0bddf8f07 npns: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
5ce0e127da bgtc: Update to 12.x and implement OpenTaskService 2021-04-09 00:49:47 -04:00
Morph
6af7bd02b2 vi: Update to 12.x 2021-04-09 00:49:47 -04:00
Morph
7e62452ac8 erpt: Update to 12.x 2021-04-09 00:49:46 -04:00
Morph
5ec2fdceca btm: Update to 12.x 2021-04-09 00:49:46 -04:00
Morph
214ef2dd8a btdrv: Update to 12.x 2021-04-09 00:49:46 -04:00
bunnei
c1017efb4a
Merge pull request #6168 from Morph1984/stub-SetNpadAnalogStickUseCenterClamp
service: hid: Stub SetAnalogStickUseCenterClamp
2021-04-08 21:16:47 -07:00
german77
09a8e08109 wlan: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
ac14ef70b5 usb: Use proper names 2021-04-08 19:40:25 -06:00
german77
35abd560c4 ITimeZoneService: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
e7530b341e spl: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
01928b1d17 sfdnsres: Use proper names 2021-04-08 19:40:25 -06:00
german77
ff1201210c nsd: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
f90041a2d4 ethc: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
6c81332ca7 sm: Use proper names, update to 12.x 2021-04-08 19:40:25 -06:00
german77
7133bfdd2c set_sys: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
556c5df745 pctl_module: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
4530b58eb0 pcie: Use proper names 2021-04-08 19:40:25 -06:00
german77
53f1560a24 olsc: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
c37b8a1028 pl_u: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
278c38aa4a ldr: Use proper names 2021-04-08 19:40:25 -06:00
german77
a4e2821530 arp: Use proper names, update to 12.x 2021-04-08 19:40:25 -06:00
german77
a83f0f7154 caps_u: Update to 12.x 2021-04-08 19:40:25 -06:00
german77
dbc4c8e314 caps_a: Update to 12.x 2021-04-08 19:40:24 -06:00
german77
03790771a6 bpc: Use proper names 2021-04-08 19:40:24 -06:00
german77
0377618288 bcat_module: Update to 12.x 2021-04-08 19:40:24 -06:00
german77
247b1c14d2 codecctl: Use proper names 2021-04-08 19:40:24 -06:00
german77
ec0e644fb0 audren_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
8f1300cd31 audren_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
6219da627b audrec_u: Use proper names, update to 12.x 2021-04-08 19:40:24 -06:00
german77
5ce97bf0a0 audrec_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
b059db74c5 audout_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
c51d9e0b0a audout_a: Use proper names 2021-04-08 19:40:24 -06:00
german77
d7f2078e7b audin_u: Use proper names 2021-04-08 19:40:24 -06:00
german77
b6bbc0d483 audin_a: Use proper names 2021-04-08 19:40:24 -06:00
bunnei
d894818bb3
Merge pull request #6157 from Morph1984/am-update-12.x
service: am: Update service function tables
2021-04-08 16:37:59 -07:00
bunnei
1744fa6ecf
Merge pull request #6062 from ameerj/auto-stub
service: Add a toggle for auto stub fallback
2021-04-08 15:32:41 -07:00
bunnei
dfac2e2d25
Merge pull request #6145 from lat9nq/nvhost_empty_memcpy
nvhost_nvdec_common: Avoid memcpy with null pointers
2021-04-08 13:23:05 -07:00
Morph
2283fccc1b service: time: Setup the network clock with the local clock context
Setting the network time allows some time based events using the network clock to not reset.
2021-04-08 13:26:38 -04:00
Morph
8e545deab9 service: hid: Stub SetAnalogStickUseCenterClamp
- Used by eBASEBALLパワフルプロ野球2020
2021-04-08 03:41:06 -04:00
bunnei
15a07f0282
Merge pull request #6160 from Morph1984/fs-update-12.x
service: fs: Update service function tables
2021-04-07 20:54:42 -07:00
Morph
28d3661a5c service: time: Fix CalculateStandardUserSystemClockDifferenceByUser
CalculateStandardUserSystemClockDifferenceByUser passes in the ClockSnapshots through 2 input buffers and not as raw arguments. Fix this by reading the 2 input buffers instead of popping raw arguments.
2021-04-07 23:34:14 -04:00
bunnei
262a70223f
Merge pull request #6143 from lat9nq/nvhost_null_memcpy
nvhost_ctrl_gpu: Avoid sending null pointer to memcpy
2021-04-07 16:50:22 -07:00
bunnei
535e50db1c
Merge pull request #6159 from Morph1984/acc-update-12.x
service: acc: Update service function tables
2021-04-07 14:37:59 -07:00
Morph
a2d40b8185 hwopus: Update to 12.x 2021-04-07 02:57:39 -04:00
Morph
1ad4c98a5c IFile: Update to 12.x 2021-04-07 02:49:19 -04:00
Morph
c44db90ad1 fsp-srv: Update to 12.x 2021-04-07 02:46:29 -04:00
Morph
531e797795 dauth_o: Update to 11.x 2021-04-07 02:15:55 -04:00
Morph
ded420cfeb acc_u1: Update to 12.x 2021-04-07 02:15:55 -04:00
Morph
63caeca6ba acc_su: Update to 12.x 2021-04-07 02:15:55 -04:00