---
name: "gfx_mode_select_filter"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/gfx_mode_select_filter"
---

# gfx\_mode\_select\_filter(3alleg)

Even more extended version of the graphics mode selection dialog. Allegro game programming library.

## NAME

gfx\_mode\_select\_filter - Even more extended version of the graphics mode selection dialog. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int gfx\_mode\_select\_filter(int \*card, int \*w, int \*h, int \*color\_depth,** **int (\*filter)(int, int, int, int));**

## DESCRIPTION

Even more extended version of the graphics mode selection dialog, which allows the programmer to customize the contents of the dialog and the user to select the color depth as well as the resolution and hardware driver. \`filter' will be passed (card, w, h, color\_depth) quadruplets and must return 0 to let the specified quadruplet be added to the list of displayed modes.

This version of the function reads the initial values from the  parameters when it activates so you can specify the default values. In fact, you should be sure not to pass in uninitialised values.

## SEE ALSO

[**gfx\_mode\_select**(3alleg)](/gfx_mode_select/3alleg.md), [**gfx\_mode\_select\_ex**(3alleg)](/gfx_mode_select_ex/3alleg.md), [**set\_color\_depth**(3alleg)](/set_color_depth/3alleg.md), [**set\_gfx\_mode**(3alleg)](/set_gfx_mode/3alleg.md), [**gui\_fg\_color**(3alleg)](/gui_fg_color/3alleg.md)
