mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 05:40:06 +00:00
Merge pull request #997 from lioncash/const-func
core: Make function reference parameters const where applicable
This commit is contained in:
commit
5191c20b71
@ -201,7 +201,7 @@ ResultCode HLERequestContext::PopulateFromIncomingCommandBuffer(u32_le* src_cmdb
|
|||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(Thread& thread) {
|
ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(const Thread& thread) {
|
||||||
std::array<u32, IPC::COMMAND_BUFFER_LENGTH> dst_cmdbuf;
|
std::array<u32, IPC::COMMAND_BUFFER_LENGTH> dst_cmdbuf;
|
||||||
Memory::ReadBlock(*thread.owner_process, thread.GetTLSAddress(), dst_cmdbuf.data(),
|
Memory::ReadBlock(*thread.owner_process, thread.GetTLSAddress(), dst_cmdbuf.data(),
|
||||||
dst_cmdbuf.size() * sizeof(u32));
|
dst_cmdbuf.size() * sizeof(u32));
|
||||||
|
@ -132,7 +132,7 @@ public:
|
|||||||
ResultCode PopulateFromIncomingCommandBuffer(u32_le* src_cmdbuf, Process& src_process,
|
ResultCode PopulateFromIncomingCommandBuffer(u32_le* src_cmdbuf, Process& src_process,
|
||||||
HandleTable& src_table);
|
HandleTable& src_table);
|
||||||
/// Writes data from this context back to the requesting process/thread.
|
/// Writes data from this context back to the requesting process/thread.
|
||||||
ResultCode WriteToOutgoingCommandBuffer(Thread& thread);
|
ResultCode WriteToOutgoingCommandBuffer(const Thread& thread);
|
||||||
|
|
||||||
u32_le GetCommand() const {
|
u32_le GetCommand() const {
|
||||||
return command;
|
return command;
|
||||||
|
@ -16,7 +16,7 @@ BufferQueue::BufferQueue(u32 id, u64 layer_id) : id(id), layer_id(layer_id) {
|
|||||||
Kernel::Event::Create(Kernel::ResetType::Sticky, "BufferQueue NativeHandle");
|
Kernel::Event::Create(Kernel::ResetType::Sticky, "BufferQueue NativeHandle");
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferQueue::SetPreallocatedBuffer(u32 slot, IGBPBuffer& igbp_buffer) {
|
void BufferQueue::SetPreallocatedBuffer(u32 slot, const IGBPBuffer& igbp_buffer) {
|
||||||
Buffer buffer{};
|
Buffer buffer{};
|
||||||
buffer.slot = slot;
|
buffer.slot = slot;
|
||||||
buffer.igbp_buffer = igbp_buffer;
|
buffer.igbp_buffer = igbp_buffer;
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
MathUtil::Rectangle<int> crop_rect;
|
MathUtil::Rectangle<int> crop_rect;
|
||||||
};
|
};
|
||||||
|
|
||||||
void SetPreallocatedBuffer(u32 slot, IGBPBuffer& buffer);
|
void SetPreallocatedBuffer(u32 slot, const IGBPBuffer& igbp_buffer);
|
||||||
boost::optional<u32> DequeueBuffer(u32 width, u32 height);
|
boost::optional<u32> DequeueBuffer(u32 width, u32 height);
|
||||||
const IGBPBuffer& RequestBuffer(u32 slot) const;
|
const IGBPBuffer& RequestBuffer(u32 slot) const;
|
||||||
void QueueBuffer(u32 slot, BufferTransformFlags transform,
|
void QueueBuffer(u32 slot, BufferTransformFlags transform,
|
||||||
|
Loading…
Reference in New Issue
Block a user