Changeset - r25005:73570e000548
[Not reviewed]
master
0 3 0
Michael Lutz - 3 years ago 2021-03-08 14:20:49
michi@icosahedron.de
Fix #8808: [OSX, OpenGL] Crash on switching blitters due to double-mapping the video buffer.
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/video/cocoa/cocoa_ogl.mm
Show inline comments
 
@@ -265,7 +265,7 @@ void VideoDriver_CocoaOpenGL::AllocateBa
 
	CGLSetCurrentContext(this->gl_context);
 
	NSRect frame = [ this->cocoaview getRealRect:[ this->cocoaview frame ] ];
 
	OpenGLBackend::Get()->Resize(frame.size.width, frame.size.height, force);
 
	_screen.dst_ptr = this->GetVideoPointer();
 
	if (this->buffer_locked) _screen.dst_ptr = this->GetVideoPointer();
 
	this->dirty_rect = {};
 

	
 
	/* Redraw screen */
src/video/cocoa/cocoa_v.mm
Show inline comments
 
@@ -213,7 +213,7 @@ bool VideoDriver_Cocoa::ToggleFullscreen
 
 */
 
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);
 
}
 

	
 
/**
src/video/cocoa/cocoa_wnd.mm
Show inline comments
 
@@ -700,9 +700,9 @@ void CocoaDialog(const char *title, cons
 
		if (!EditBoxInGlobalFocus() || IsInsideMM(pressed_key & ~WKC_SPECIAL_KEYS, WKC_F1, WKC_PAUSE + 1)) {
 
			HandleKeypress(pressed_key, unicode);
 
		}
 
		DEBUG(driver, 2, "cocoa_v: QZ_KeyEvent: %x (%x), down, mapping: %x", keycode, unicode, pressed_key);
 
		DEBUG(driver, 3, "cocoa_v: QZ_KeyEvent: %x (%x), down, mapping: %x", keycode, unicode, pressed_key);
 
	} else {
 
		DEBUG(driver, 2, "cocoa_v: QZ_KeyEvent: %x (%x), up", keycode, unicode);
 
		DEBUG(driver, 3, "cocoa_v: QZ_KeyEvent: %x (%x), up", keycode, unicode);
 
	}
 

	
 
	return interpret_keys;
0 comments (0 inline, 0 general)