add res enumeration to LLW SDL
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "RageDisplay.h" // for REFRESH_DEFAULT
|
||||
#include "StepMania.h"
|
||||
#include "GameLoop.h"
|
||||
#include "DisplayResolutions.h"
|
||||
|
||||
#if defined(MACOSX)
|
||||
extern "C"
|
||||
@@ -225,6 +226,18 @@ void LowLevelWindow_SDL::Update()
|
||||
}
|
||||
}
|
||||
|
||||
void LowLevelWindow_SDL::GetDisplayResolutions( DisplayResolutions &out ) const
|
||||
{
|
||||
SDL_Rect **modes = SDL_ListModes(NULL, SDL_RESIZABLE | SDL_OPENGL | SDL_FULLSCREEN );
|
||||
ASSERT_M( modes, "No modes available" );
|
||||
|
||||
for(int i=0; modes[i]; ++i )
|
||||
{
|
||||
DisplayResolution res = { modes[i]->w, modes[i]->h };
|
||||
out.s.insert( res );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford, Glenn Maynard
|
||||
* All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user