summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/sdl/window.cpp')
-rw-r--r--src/osd/sdl/window.cpp54
1 files changed, 13 insertions, 41 deletions
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 12dbae4f6e9..17e10f575dd 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -92,53 +92,25 @@ bool sdl_osd_interface::window_init()
{
osd_printf_verbose("Enter sdlwindow_init\n");
- // initialize the renderer
- const int fallbacks[VIDEO_MODE_COUNT] = {
- -1, // NONE -> no fallback
- -1, // No GDI on Linux
- VIDEO_MODE_OPENGL, // BGFX -> OpenGL
-#if (USE_OPENGL)
- VIDEO_MODE_SDL2ACCEL, // OpenGL -> SDL2Accel
-#endif
- -1, // SDL2ACCEL -> SOFT
- -1, // No D3D on Linux
- -1, // SOFT -> no fallback
- };
+ // initialize the drawers
- int current_mode = video_config.mode;
- while (current_mode != VIDEO_MODE_NONE)
+ switch (video_config.mode)
{
- bool error = false;
- switch(current_mode)
- {
- case VIDEO_MODE_BGFX:
- renderer_bgfx::init(machine());
- break;
+ case VIDEO_MODE_BGFX:
+ renderer_bgfx::init(machine());
+ break;
#if (USE_OPENGL)
- case VIDEO_MODE_OPENGL:
- renderer_ogl::init(machine());
- break;
+ case VIDEO_MODE_OPENGL:
+ renderer_ogl::init(machine());
+ break;
#endif
- case VIDEO_MODE_SDL2ACCEL:
- renderer_sdl2::init(machine());
- break;
- case VIDEO_MODE_SOFT:
- renderer_sdl1::init(machine());
- break;
- default:
- fatalerror("Unknown video mode.");
- break;
- }
- if (error)
- {
- current_mode = fallbacks[current_mode];
- }
- else
- {
+ case VIDEO_MODE_SDL2ACCEL:
+ renderer_sdl2::init(machine());
+ break;
+ case VIDEO_MODE_SOFT:
+ renderer_sdl1::init(machine());
break;
- }
}
- video_config.mode = current_mode;
/* We may want to set a number of the hints SDL2 provides.
* The code below will document which hints were set.