You must be logged in to do that.

SetResolution

SetResolution
void SetResolution(int xres, int yres)

Documentation

Sets the screen resolution to the (xres, yres). This will always succeed in windowed mode, but it may fail in fullscreen mode.

Come to think of it, I should probably make it return a value based on whether or not it suceeds. If you see this, remind me! :D

Example Usage

SetResolution(640, 480);
Talkback

Post a new comment?

Talkback #1 written by Zip on 2004-10-06.

A wrapper for those who do need a return value from this function.

int ChangeResolution(int xres, int yres)
{
	SetResolution(xres, yres);
	int screenx = ImageWidth(screen);
	int screeny = ImageHeight(screen);
	if (screenx == xres && screeny == yres) return 0;
	else return 1;
}

Post a new comment?

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.