mirror of https://github.com/stella-emu/stella.git
added (disabled) SDL renderer information code
This commit is contained in:
parent
b2d1c37f1e
commit
0385dd4b01
|
@ -84,6 +84,46 @@ void FrameBufferSDL2::queryHardware(vector<GUI::Size>& displays,
|
||||||
displays.emplace_back(display.w, display.h);
|
displays.emplace_back(display.w, display.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
struct RenderName
|
||||||
|
{
|
||||||
|
string sdlName;
|
||||||
|
string stellaName;
|
||||||
|
};
|
||||||
|
// create name map for all currently known SDL renderers
|
||||||
|
const int NUM_RENDERES = 5;
|
||||||
|
static const RenderName RENDERER_NAMES[NUM_RENDERES] =
|
||||||
|
{
|
||||||
|
{"direct3d", "Direct3D"},
|
||||||
|
{"opengl", "OpenGL"},
|
||||||
|
{"opengles", "OpenGLES"},
|
||||||
|
{"opengles2", "OpenGLES2"},
|
||||||
|
{"software", "Software"}
|
||||||
|
};
|
||||||
|
|
||||||
|
int numDrivers = SDL_GetNumRenderDrivers();
|
||||||
|
for(int i = 0; i < numDrivers; ++i)
|
||||||
|
{
|
||||||
|
SDL_RendererInfo info;
|
||||||
|
if(SDL_GetRenderDriverInfo(i, &info) == 0)
|
||||||
|
{
|
||||||
|
// map SDL names into nicer Stella names
|
||||||
|
bool found = false;
|
||||||
|
for(int j = 0; j < NUM_RENDERES; ++j)
|
||||||
|
{
|
||||||
|
if(RENDERER_NAMES[j].sdlName == info.name)
|
||||||
|
{
|
||||||
|
VarList::push_back(renderers, RENDERER_NAMES[j].stellaName, info.name);
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found)
|
||||||
|
VarList::push_back(renderers, info.name, info.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// For now, supported render types are hardcoded; eventually, SDL may
|
// For now, supported render types are hardcoded; eventually, SDL may
|
||||||
// provide a method to query this
|
// provide a method to query this
|
||||||
#if defined(BSPF_WINDOWS)
|
#if defined(BSPF_WINDOWS)
|
||||||
|
|
Loading…
Reference in New Issue