---
name: "vga_getmodename"
section: "3"
platform: "linux"
package: "libsvga1-dev"
version: "1:1.4.3-33"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/vga_getmodename"
---

# vga\_getmodename(3)

return a name for the given video mode

## NAME

vga\_getmodename - return a name for the given video mode

## SYNOPSIS

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

**char \*vga\_getmodename(int** *mode***);**

## DESCRIPTION

A pointer to a static memory buffer is returned. Depending on mode it consist of a capital **G** followed by the **amount of x pixels**, followed by a lower case **x**, followed by the **amount of y pixels**, followed by a lower case **x**. Finally the number of different colors is appended. Here the shortcuts **32K**,**64K**,**16M**, and **16M4** are used for 32768, 65536, and 16777216 are used. The last refers also to 16777216 which are store in 4 bytes (highest address byte unused) for easier screen access.

For unsupported values of *mode* the empty string "" is returned. In general the string resembles the corresponding **#define** for the videomode in **#include \<vga.h\>**.

## EXAMPLE

**vga\_getmodename(10)** returns **"G640x480x256"**.

## SEE ALSO

[**svgalib**(7)](/svgalib/7.md), [**vgagl**(7)](/vgagl/7.md), [**libvga.config**(5)](/libvga.config/5.md), **vgatest**(6), [**vga\_hasmode**(3)](/vga_hasmode/3.md), **vga\_modeinfo**(3), [**vga\_setmode**(3)](/vga_setmode/3.md), [**vga\_lastmodenumber**(3)](/vga_lastmodenumber/3.md), [**vga\_getcurrentmode**(3)](/vga_getcurrentmode/3.md), [**vga\_getdefaultmode**(3)](/vga_getdefaultmode/3.md), [**vga\_getmodenumber**(3)](/vga_getmodenumber/3.md)

## AUTHOR

This manual page was edited by Michael Weller \<eowmob@exp-math.uni-essen.de\>. The exact source of the referenced function as well as of the original documentation is unknown.

It is very likely that both are at least to some extent are due to Harm Hanemaayer \<H.Hanemaayer@inter.nl.net\>.

Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual.
