mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-21 09:30:08 +00:00
Achievements: Queue RAIntegration writes on CPU thread
This commit is contained in:
parent
faa7ca5121
commit
8f8f7cd1cb
@ -4749,8 +4749,9 @@ void Achievements::RAIntegrationEventHandler(const rc_client_raintegration_event
|
|||||||
void Achievements::RAIntegrationWriteMemoryCallback(uint32_t address, uint8_t* buffer, uint32_t num_bytes,
|
void Achievements::RAIntegrationWriteMemoryCallback(uint32_t address, uint8_t* buffer, uint32_t num_bytes,
|
||||||
rc_client_t* client)
|
rc_client_t* client)
|
||||||
{
|
{
|
||||||
// I hope this is called on the CPU thread...
|
// This can be called on the UI thread, so always queue it.
|
||||||
CPU::SafeWriteMemoryBytes(address, buffer, num_bytes);
|
llvm::SmallVector<u8, 16> data(buffer, buffer + num_bytes);
|
||||||
|
Host::RunOnCPUThread([address, data = std::move(data)]() { CPU::SafeWriteMemoryBytes(address, data); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void Achievements::RAIntegrationGetGameNameCallback(char* buffer, uint32_t buffer_size, rc_client_t* client)
|
void Achievements::RAIntegrationGetGameNameCallback(char* buffer, uint32_t buffer_size, rc_client_t* client)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user