From 406ee9234aee08b65450dacc57ffc027fc15c562 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 9 Aug 2014 16:27:07 +0300 Subject: [PATCH] Added two SDL functions needed for GZDoom --- src/cocoa/i_backend_cocoa.mm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/cocoa/i_backend_cocoa.mm b/src/cocoa/i_backend_cocoa.mm index d7e46dfe0..8d6f53b4c 100644 --- a/src/cocoa/i_backend_cocoa.mm +++ b/src/cocoa/i_backend_cocoa.mm @@ -1476,8 +1476,13 @@ SDL_Rect** SDL_ListModes(SDL_PixelFormat* format, Uint32 flags) return &resolutions[0]; } +int SDL_ShowCursor(int) +{ + // Does nothing + return 0; +} + -//static GLAuxilium::Texture2D* s_softwareTexture; static GLuint s_frameBufferTexture = 0; static const Uint16 BYTES_PER_PIXEL = 4; @@ -1597,6 +1602,19 @@ void SDL_GL_SwapBuffers() [[NSOpenGLContext currentContext] flushBuffer]; } +int SDL_GL_SetAttribute(SDL_GLattr attr, int value) +{ + if (SDL_GL_MULTISAMPLESAMPLES == attr) + { + [s_applicationDelegate setMultisample:value]; + } + + // Not interested in other attributes + + return 0; +} + + int SDL_LockSurface(SDL_Surface* surface) { ZD_UNUSED(surface);