---
name: "SDL_MUSTLOCK"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_MUSTLOCK"
---

# SDL\_MUSTLOCK(3)

Evaluates to true if the surface needs to be locked before access.

## NAME

SDL\_MUSTLOCK - Evaluates to true if the surface needs to be locked before access.

## HEADER FILE

Defined in SDL3/SDL\_surface.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**#define SDL\_MUSTLOCK(S) (((S)-\>flags & SDL\_SURFACE\_LOCK\_NEEDED) == SDL\_SURFACE\_LOCK\_NEEDED)**

## AVAILABILITY

This macro is available since SDL 3.2.0.
