mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
GUI: default to non-SDL render backend if availabl
This commit is contained in:
parent
3d79827d55
commit
a267901b18
3 changed files with 11 additions and 7 deletions
|
@ -6347,8 +6347,8 @@ bool FurnaceGUI::init() {
|
||||||
|
|
||||||
logD("starting render backend...");
|
logD("starting render backend...");
|
||||||
if (!rend->init(sdlWin)) {
|
if (!rend->init(sdlWin)) {
|
||||||
if (settings.renderBackend!="SDL" && !settings.renderBackend.empty()) {
|
if (settings.renderBackend!="SDL") {
|
||||||
settings.renderBackend="";
|
settings.renderBackend="SDL";
|
||||||
//e->setConf("renderBackend","");
|
//e->setConf("renderBackend","");
|
||||||
//e->saveConf();
|
//e->saveConf();
|
||||||
//lastError=fmt::sprintf("\r\nthe render backend has been set to a safe value. please restart Furnace.");
|
//lastError=fmt::sprintf("\r\nthe render backend has been set to a safe value. please restart Furnace.");
|
||||||
|
|
|
@ -75,16 +75,20 @@ enum FurnaceGUIRenderBackend {
|
||||||
GUI_BACKEND_DX11
|
GUI_BACKEND_DX11
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_RENDER_SDL
|
|
||||||
#define GUI_BACKEND_DEFAULT GUI_BACKEND_SDL
|
|
||||||
#define GUI_BACKEND_DEFAULT_NAME "SDL"
|
|
||||||
#else
|
|
||||||
#ifdef HAVE_RENDER_DX11
|
#ifdef HAVE_RENDER_DX11
|
||||||
#define GUI_BACKEND_DEFAULT GUI_BACKEND_DX11
|
#define GUI_BACKEND_DEFAULT GUI_BACKEND_DX11
|
||||||
#define GUI_BACKEND_DEFAULT_NAME "DirectX 11"
|
#define GUI_BACKEND_DEFAULT_NAME "DirectX 11"
|
||||||
#else
|
#else
|
||||||
|
#ifdef HAVE_RENDER_GL
|
||||||
#define GUI_BACKEND_DEFAULT GUI_BACKEND_GL
|
#define GUI_BACKEND_DEFAULT GUI_BACKEND_GL
|
||||||
#define GUI_BACKEND_DEFAULT_NAME "OpenGL"
|
#define GUI_BACKEND_DEFAULT_NAME "OpenGL"
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_RENDER_SDL
|
||||||
|
#define GUI_BACKEND_DEFAULT GUI_BACKEND_SDL
|
||||||
|
#define GUI_BACKEND_DEFAULT_NAME "SDL"
|
||||||
|
#else
|
||||||
|
#error how did you manage to do that?
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2772,7 +2772,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
settings.orderButtonPos=e->getConfInt("orderButtonPos",2);
|
settings.orderButtonPos=e->getConfInt("orderButtonPos",2);
|
||||||
settings.compress=e->getConfInt("compress",1);
|
settings.compress=e->getConfInt("compress",1);
|
||||||
settings.newPatternFormat=e->getConfInt("newPatternFormat",1);
|
settings.newPatternFormat=e->getConfInt("newPatternFormat",1);
|
||||||
settings.renderBackend=e->getConfString("renderBackend","SDL");
|
settings.renderBackend=e->getConfString("renderBackend",GUI_BACKEND_DEFAULT_NAME);
|
||||||
settings.renderClearPos=e->getConfInt("renderClearPos",0);
|
settings.renderClearPos=e->getConfInt("renderClearPos",0);
|
||||||
settings.insertBehavior=e->getConfInt("insertBehavior",1);
|
settings.insertBehavior=e->getConfInt("insertBehavior",1);
|
||||||
settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1);
|
settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1);
|
||||||
|
|
Loading…
Reference in a new issue