Added SDL_GetCurrentVideoDisplay()
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402009
This commit is contained in:
parent
8cff7eb76a
commit
7b00c63ef6
2 changed files with 29 additions and 10 deletions
|
@ -355,13 +355,21 @@ SDL_SelectVideoDisplay(int index)
|
|||
SDL_UninitializedVideo();
|
||||
return (-1);
|
||||
}
|
||||
if (index >= 0) {
|
||||
if (index >= _this->num_displays) {
|
||||
SDL_SetError("index must be in the range 0 - %d",
|
||||
_this->num_displays - 1);
|
||||
return -1;
|
||||
}
|
||||
_this->current_display = index;
|
||||
if (index < 0 || index >= _this->num_displays) {
|
||||
SDL_SetError("index must be in the range 0 - %d",
|
||||
_this->num_displays - 1);
|
||||
return -1;
|
||||
}
|
||||
_this->current_display = index;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
SDL_GetCurrentVideoDisplay(void)
|
||||
{
|
||||
if (!_this) {
|
||||
SDL_UninitializedVideo();
|
||||
return (-1);
|
||||
}
|
||||
return _this->current_display;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue