Commit graph

2279 commits

Author SHA1 Message Date
Weiyi Wang
0b4be6e53a
Merge pull request #4803 from FearlessTobi/port-2580
Port yuzu-emu/yuzu#2580: "kernel/vm_manager: Remove redundant Reset call in destructor "
2019-06-29 22:52:36 -04:00
Lioncash
1f2e75ecea kernel/vm_manager: Remove redundant Reset call in destructor
This is performing more work than would otherwise be necessary during
VMManager's destruction. All we actually want to occur in this scenario
is for any allocated memory to be freed, which will happen automatically
as the VMManager instance goes out of scope.

Anything else being done is simply unnecessary work.
2019-06-24 17:21:13 +02:00
Weiyi Wang
d483e556e3 gsp: remove unused GetFramebufferInfo 2019-06-23 14:25:28 -04:00
Weiyi Wang
8251de44cf GSP_GPU: move used_thread_ids into the class 2019-06-23 14:22:38 -04:00
Tobias
318095f9b9
Port yuzu-emu/yuzu#2249: "ipc_helpers: Allow pushing and popping floating-point values" (#4702)
Certain values that are passed through the IPC buffer are actually
floating point values, not solely integral values.
2019-06-09 16:03:22 +02:00
Weiyi Wang
803e1fd5a0
Merge pull request #4747 from MerryMage/copyblock
memory: Re-order CopyBlock arguments to match other overload
2019-05-07 09:34:02 -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
Pengfei Zhu
37861526ff
Merge pull request #4733 from zhaowenlan1779/ps
service/ps: Implement PS:EncryptDecryptAes
2019-04-29 21:39:53 +08:00
Tobias
7ea82e7941
Merge pull request #4736 from FearlessTobi/port-2356
Port yuzu-emu/yuzu#2356: "kernel/{server_port, server_session}: Return pairs instead of tuples from pair creation functions"
2019-04-27 00:07:13 +02:00
Ben
f4da2de99a
Set accepted EULA version to max value (#4728)
* Set accepted EULA version to max value

CFG: write the max value of 0x7F7F to the default cfg savegame and
auto update on init

CECD: Actually read the EULA version from CFG
2019-04-23 23:18:27 +02:00
Ben
624271696e
HTTP_C: Implement SetClientCertContext, GetSSLError, BeginRequest, BeginRequestAsync (#4753)
* HTTP_C: Implement SetClientCertContext and GetSSLError; Stubbed BeginRequest and BeginRequestAsync

* HTTP_C: Move logs to beginning of function calls
2019-04-23 18:35:28 +02:00
Lioncash
882f647760 kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
This doesn't actually modify internal state of a wait object, so it can
be const qualified.
2019-04-20 20:38:38 +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
MerryMage
065d3ce063 memory: Reorder parameters of CopyBlock to a more sensible order
* Also implement CopyBlock variants in terms of each other
2019-04-19 19:46:09 +01:00
zhupengfei
0f65dac964
service/ps: Address review 2019-04-16 22:17:07 +08:00
Lioncash
42535468c3 kernel/server_session: Return a std::pair from CreateSessionPair()
Keeps the return type consistent with the function name. While we're at
it, we can also reduce the amount of boilerplate involved with handling
these by using structured bindings.
2019-04-15 21:46:57 +02:00
Lioncash
1afc2c72d6 kernel/server_port: Return a std::pair from CreatePortPair()
Returns the same type that the function name describes.
2019-04-15 18:42:17 +02:00
Lioncash
c4c644b285 kernel: Make handle type declarations constexpr
Some objects declare their handle type as const, while others declare it
as constexpr. This makes the const ones constexpr for consistency, and
prevent unexpected compilation errors if these happen to be attempted to be
used within a constexpr context.
2019-04-15 18:10:11 +02:00
zhupengfei
b34847d59e
service/ps: Implement PS:EncryptDecryptAES 2019-04-15 22:56:55 +08:00
Weiyi Wang
11754778bb
Merge pull request #4716 from wwylele/client-is-known
HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread
2019-04-15 09:08:07 -04: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
zhupengfei
d7fbc1ca2c
common/string_util: Move TextFromBuffer to string_util 2019-04-08 22:34:21 +08:00
zhupengfei
25be09c7a3
applets/swkbd: Address comments 2019-04-08 21:45:32 +08:00
zhupengfei
8078256a88 applets/swkbd: Add callback support 2019-04-08 21:45:29 +08:00
Lioncash
aba5dae557 service/service: Remove unncessary calls to c_str()
These can just be passed regularly, now that we use fmt instead of our
old logging system.

While we're at it, make the parameters to MakeFunctionString
std::string_views.
2019-04-07 18:27:14 +02: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
fearlessTobi
f903d3161d ptm: move ptm_shared_extdata_id to header 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
Weiyi Wang
f565ea80f0 HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread
This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
2019-04-02 13:23:39 -04:00
Weiyi Wang
daeba65fb4
Merge pull request #4710 from wwylele/why-instrusive-ptr
Kernel: replace boost::intrusive_ptr with std::shared_ptr
2019-04-02 11:06:13 -04:00
Weiyi Wang
8d2718a18f CAM: initialize states 2019-03-30 11:07:11 -04:00
Weiyi Wang
05058863b5 cleanup includes 2019-03-26 10:50:41 -04:00
Weiyi Wang
5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
Weiyi Wang
c1de8acfe5
Merge pull request #4689 from wwylele/server-leak
ServiceFrameworkBase: remove ownership to ServerPort
2019-03-24 14:29:41 -04:00
Weiyi Wang
21bda754b3
Merge pull request #4396 from FearlessTobi/open-delays
fs_user: Add a delay for each file open
2019-03-23 12:21:12 -04:00
Weiyi Wang
9b07ff9681
Merge pull request #4683 from wwylele/misc-global-clean
Misc global instance reference cleaup
2019-03-22 22:28:50 -04:00
Weiyi Wang
2138db3d7d
Merge pull request #4690 from wwylele/uds-deprecated
UDS: implement deprecated functions
2019-03-21 09:52:01 -04:00
Vamsi Krishna
aedf5a84b0
Merge pull request #4671 from jroweboy/mic4
Microphone support
2019-03-20 23:12:38 +05:30
James Rowe
9739e2b6fd Support signed 8bit pcm in cubeb input. Address review 2019-03-17 22:52:03 -06:00
Weiyi Wang
4696b13170
UDS: I was drunk 2019-03-15 00:35:39 -04:00
Weiyi Wang
a986e35795 UDS: Change reply command ID for two versions of ConnectToNetwork 2019-03-14 10:10:18 -04:00
Weiyi Wang
9c016ff3a3 Y2R: pass in MemorySystem from service 2019-03-13 10:23:58 -04:00
Weiyi Wang
d6f3ac1f4e IR: pass in Core::Timing for ExtraHID 2019-03-13 10:23:58 -04:00
Weiyi Wang
ea496507d5 DSP_DSP: use member system instead of global instance 2019-03-13 10:23:58 -04:00
Weiyi Wang
aaa599a849 UDS: duplicate DecryptBeaconData implementation for deprecated version
They are really identical in the NWM module code
2019-03-13 00:21:10 -04:00
Weiyi Wang
16fb6a2c8d UDS: implement ConnectToNetworkDeprecated and forward params to ConnectToNetwork 2019-03-13 00:03:51 -04:00
Weiyi Wang
fc0fe5c3c0 UDS: devide IPC and impl for ConnectToNetwork 2019-03-13 00:03:51 -04:00