class -> typedef set.
This commit is contained in:
@@ -19,11 +19,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class DisplayResolutions
|
||||
{
|
||||
public:
|
||||
set<DisplayResolution> s;
|
||||
};
|
||||
typedef set<DisplayResolution> DisplayResolutions;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
|
||||
#include "RageTypes.h"
|
||||
#include "ModelTypes.h"
|
||||
class DisplayResolutions;
|
||||
#include <set>
|
||||
|
||||
class DisplayResolution;
|
||||
typedef set<DisplayResolution> DisplayResolutions;
|
||||
|
||||
const int REFRESH_DEFAULT = 0;
|
||||
struct RageSurface;
|
||||
|
||||
@@ -310,7 +310,7 @@ void RageDisplay_D3D::GetDisplayResolutions( DisplayResolutions &out ) const
|
||||
g_pd3d->EnumAdapterModes( D3DADAPTER_DEFAULT, i, &mode );
|
||||
|
||||
DisplayResolution res = { mode.Width, mode.Height };
|
||||
out.s.insert( res );
|
||||
out.insert( res );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,9 +85,9 @@ RString RageDisplay_Null::Init( const VideoModeParams &p, bool bAllowUnaccelerat
|
||||
|
||||
void RageDisplay_Null::GetDisplayResolutions( DisplayResolutions &out ) const
|
||||
{
|
||||
out.s.clear();
|
||||
out.clear();
|
||||
DisplayResolution res = { 640, 480 };
|
||||
out.s.insert( res );
|
||||
out.insert( res );
|
||||
}
|
||||
|
||||
RageSurface* RageDisplay_Null::CreateScreenshot()
|
||||
|
||||
@@ -441,7 +441,7 @@ RageDisplay_OGL::~RageDisplay_OGL()
|
||||
|
||||
void RageDisplay_OGL::GetDisplayResolutions( DisplayResolutions &out ) const
|
||||
{
|
||||
out.s.clear();
|
||||
out.clear();
|
||||
g_pWind->GetDisplayResolutions( out );
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ static void DisplayResolutionChoices( vector<RString> &out )
|
||||
DisplayResolutions d;
|
||||
DISPLAY->GetDisplayResolutions( d );
|
||||
|
||||
FOREACHS_CONST( DisplayResolution, d.s, iter )
|
||||
FOREACHS_CONST( DisplayResolution, d, iter )
|
||||
{
|
||||
RString s = ssprintf("%dx%d", iter->iWidth, iter->iHeight);
|
||||
out.push_back( s );
|
||||
@@ -460,7 +460,7 @@ static void DisplayResolutionM( int &sel, bool ToSel, const ConfOption *pConfOpt
|
||||
DisplayResolutions d;
|
||||
DISPLAY->GetDisplayResolutions( d );
|
||||
|
||||
FOREACHS_CONST( DisplayResolution, d.s, iter )
|
||||
FOREACHS_CONST( DisplayResolution, d, iter )
|
||||
{
|
||||
v.push_back( res_t(iter->iWidth, iter->iHeight) );
|
||||
}
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
|
||||
/* This handles low-level operations that OGL 1.x doesn't give us. */
|
||||
|
||||
class DisplayResolutions;
|
||||
#include <set>
|
||||
|
||||
class DisplayResolution;
|
||||
typedef set<DisplayResolution> DisplayResolutions;
|
||||
class VideoModeParams;
|
||||
|
||||
class LowLevelWindow
|
||||
|
||||
@@ -427,7 +427,7 @@ void LowLevelWindow_Cocoa::GetDisplayResolutions( DisplayResolutions &dr ) const
|
||||
if( safe && !GetBoolValue( safe ) )
|
||||
continue;
|
||||
DisplayResolution res = { width, height };
|
||||
dr.s.insert( res );
|
||||
dr.insert( res );
|
||||
}
|
||||
// Do not release modes! We don't own it here.
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ void LowLevelWindow_SDL::GetDisplayResolutions( DisplayResolutions &out ) const
|
||||
for(int i=0; modes[i]; ++i )
|
||||
{
|
||||
DisplayResolution res = { modes[i]->w, modes[i]->h };
|
||||
out.s.insert( res );
|
||||
out.insert( res );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ void LowLevelWindow_X11::GetDisplayResolutions( DisplayResolutions &out ) const
|
||||
for( int i = 0; i < iSizesXct; ++i )
|
||||
{
|
||||
DisplayResolution res = { pSizesX[i].width, pSizesX[i].height };
|
||||
out.s.insert( res );
|
||||
out.insert( res );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ void GraphicsWindow::GetDisplayResolutions( DisplayResolutions &out )
|
||||
if(ChangeDisplaySettings(&dm, CDS_TEST)==DISP_CHANGE_SUCCESSFUL)
|
||||
{
|
||||
DisplayResolution res = { dm.dmPelsWidth, dm.dmPelsHeight };
|
||||
out.s.insert( res );
|
||||
out.insert( res );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user