Skip to content

rc_client_can_pause

Jamiras edited this page Jun 13, 2024 · 2 revisions

Gets whether or not the client is allowed to pause at this time.

Syntax

int rc_client_can_pause(
    rc_client_t* client,
    uint32_t* frames_remaining
);

Parameters

client

The rc_client_t to query.

frames_remaining

Pointer to a variable that will be populated with the number of frames that must be processed before the client is allowed to pause again. May be NULL.

The value can be used to display an on-screen message by dividing by the framerate: "You cannot pause for another 1.2 seconds".

Returns

If the user has paused very recently, the function returns zero, and frames_remaining is set to the number of frames that must be processed before pause will be allowed again.

Otherwise, the function returns non-zero, and the delay for the next pause is increased. This continues to compound until the delay reaches 300 frames (5 seconds at 60fps) between pauses. The delay to the next pause decays if rc_client_do_frame is called enough times between calls to rc_client_can_pause.

Remarks

This function should only be called if the user is trying to pause. Calling it more frequently can cause the delay to increase unexpectedly.

Minimum version: 11.1.0

See also

rc_client_do_frame

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