Skip to content

rc_client_set_allow_background_memory_reads

Jamiras edited this page Jun 17, 2025 · 1 revision

Sets whether background memory reads are allowed (true by default).

Syntax

void rc_client_set_allow_background_memory_reads(
    rc_client_t* client,
    int enabled
);

Parameters

client

The rc_client_t to modify.

enabled

1 to enable background memory reads (default), 0 to disable them.

Remarks

Allows a client to specify that memory reads should only occur within the context of rc_client_do_frame or rc_client_idle. The trade-off is that the work requiring the memory reads could be delayed by as much as however infrequently rc_client_idle is called.

For basic integrations, this currently only affects the achievement validation logic while loading a game. After the achievements are received from the server, we call the memory_read_function to make sure the client exposes the requested memory so we can mark achievements as unsupported before calling the load game callback. This validation typically happens on the background thread where the server request was received. When rc_client_set_allow_background_memory_reads is set to false, the load process is put on hold and the validation is queued up to be run by the rc_client_idle loop.

When integrating with raintegration, this also tells the DLL to offload all of its memory reads that are triggered by the user interacting with the UI so they will also occur in the rc_client_idle loop.

Minimum version: 12.0.0

See also

rc_client_do_frame

rc_client_idle

rcheevos
rc_client

Integration guide

client

user

game

processing

rc_client_raintegration

Integration guide

rc_runtime
rhash
rapi

common

user

runtime

info

Clone this wiki locally