diff options
author | 2015-04-04 14:53:47 +1100 | |
---|---|---|
committer | 2015-04-04 14:53:47 +1100 | |
commit | 4cd434246dd203d622d1b3c74050588a514907e4 (patch) | |
tree | c85841928a91f5625ed4c8291c20ec7936bb2a49 /src/osd | |
parent | 7b19a9d10bd26555f3af34647f637cdbf15180d2 (diff) |
Bring back USE_SDL, CYGWIN_BUILD and malloc debugging for Windows OSD
Diffstat (limited to 'src/osd')
-rw-r--r-- | src/osd/modules/render/drawogl.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/osd/modules/render/drawogl.c b/src/osd/modules/render/drawogl.c index 4a3bf4d1e45..05cd39fe985 100644 --- a/src/osd/modules/render/drawogl.c +++ b/src/osd/modules/render/drawogl.c @@ -32,8 +32,8 @@ #include "modules/lib/osdlib.h" #include "modules/lib/osdobj_common.h" -#ifdef OSD_WINDOWS -#define SDLMAME_SDL2 1 +#if defined(OSD_WINDOWS) && !defined(SDLMAME_SDL2) +#define SDLMAME_SDL2 0 #endif // OpenGL headers @@ -189,9 +189,8 @@ enum // TYPES //============================================================ -#if (SDLMAME_SDL2) +#if defined(OSD_WINDOWS) -#ifdef OSD_WINDOWS class win_gl_context : public osd_gl_context { public: @@ -347,7 +346,8 @@ private: HMODULE win_gl_context::m_module; -#else +#elif SDLMAME_SDL2 + class sdl_gl_context : public osd_gl_context { public: @@ -396,7 +396,7 @@ private: SDL_Window *m_window; char m_error[256]; }; -#endif + #else // SDL 1.2 class sdl12_gl_context : public osd_gl_context @@ -442,7 +442,6 @@ private: char m_error[256]; }; - #endif //============================================================ @@ -763,12 +762,13 @@ int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks) dll_loaded = 0; load_gl_lib(machine); - if (SDLMAME_SDL2) - { - osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n"); - } - else - osd_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n"); +#if defined(OSD_WINDOWS) + osd_printf_verbose("Using Windows OpenGL driver\n"); +#elif SDLMAME_SDL2 + osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n"); +#else + osd_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n"); +#endif return 0; } @@ -1030,13 +1030,11 @@ void sdl_info_ogl::initialize_gl() int sdl_info_ogl::create() { -#if (SDLMAME_SDL2) // create renderer -#ifdef OSD_WINDOWS +#if defined(OSD_WINDOWS) m_gl_context = global_alloc(win_gl_context(window().m_hwnd)); -#else +#elif SDLMAME_SDL2 m_gl_context = global_alloc(sdl_gl_context(window().sdl_window())); -#endif #else m_gl_context = global_alloc(sdl12_gl_context(window().sdl_surface())); #endif @@ -1530,7 +1528,7 @@ int sdl_info_ogl::draw(const int update) if (m_init_context) { // do some one-time OpenGL setup -#if (SDLMAME_SDL2) +#if SDLMAME_SDL2 // FIXME: SRGB conversion is working on SDL2, may be of use // when we eventually target gamma and monitor profiles. //glEnable(GL_FRAMEBUFFER_SRGB); @@ -1560,7 +1558,7 @@ int sdl_info_ogl::draw(const int update) loadGLExtensions(); } -#if (!SDLMAME_SDL2) +#if !defined(OSD_WINDOWS) && !SDLMAME_SDL2 // force all textures to be regenerated destroy_all_textures(); #endif |