From 36ad485eddd4ef157dacd436bef32ca70f347204 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 1 Apr 2017 13:16:31 +0300 Subject: [PATCH] Proper default value for GL framebuffer lock in Cocoa backend No more error when running with +map command line parameter with classic HUD: > VM execution aborted: Attempt to draw to screen outside a draw function > Called from BaseStatusBar.DrawImage [Native] > Called from DoomStatusBar.DrawFullScreenStuff at gzdoom.pk3:zscript/statusbar/doom_sbar.txt, line 140 > Called from DoomStatusBar.Draw at gzdoom.pk3:zscript/statusbar/doom_sbar.txt, line 41 --- src/posix/cocoa/i_video.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 906fc413df..e11a7c7f5f 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -1146,7 +1146,7 @@ void CocoaFrameBuffer::Flip() SDLGLFB::SDLGLFB(void*, const int width, const int height, int, int, const bool fullscreen, bool bgra) : DFrameBuffer(width, height, bgra) -, m_lock(-1) +, m_lock(0) , m_isUpdatePending(false) { CGGammaValue gammaTable[GAMMA_TABLE_SIZE];