summaryrefslogtreecommitdiff
path: root/src/video/cocoa/cocoa_v.mm
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-03-08 15:20:49 +0100
committerMichael Lutz <michi@icosahedron.de>2021-03-08 15:43:22 +0100
commit25656a10cb237fc1be7dac3e2207a1986633bf06 (patch)
treee989d2081c2dbcf025ac830843fb382701133d73 /src/video/cocoa/cocoa_v.mm
parentae1f7bd6954176c02effe4048e8b9fe900038389 (diff)
downloadopenttd-25656a10cb237fc1be7dac3e2207a1986633bf06.tar.xz
Fix #8808: [OSX, OpenGL] Crash on switching blitters due to double-mapping the video buffer.
Diffstat (limited to 'src/video/cocoa/cocoa_v.mm')
-rw-r--r--src/video/cocoa/cocoa_v.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index af63fe5f4..7b7fe9d67 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -213,7 +213,7 @@ bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen)
*/
bool VideoDriver_Cocoa::AfterBlitterChange()
{
- this->ChangeResolution(_cur_resolution.width, _cur_resolution.height);
+ this->AllocateBackingStore(true);
return true;
}
@@ -224,7 +224,7 @@ void VideoDriver_Cocoa::EditBoxLostFocus()
{
[ [ this->cocoaview inputContext ] discardMarkedText ];
/* Clear any marked string from the current edit box. */
- HandleTextInput(NULL, true);
+ HandleTextInput(nullptr, true);
}
/**