forked from 4ian/GDevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Really fix SFML patch for OS X (last patch was invalid)
- Loading branch information
Showing
1 changed file
with
17 additions
and
3 deletions.
There are no files selected for viewing
20 changes: 17 additions & 3 deletions
20
ExtLibs/SFML-patches/02_workaround_OSX_crash_SFViewController.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
From f55ee73a73398bb77ce9c63ff1a13d8053cb1d18 Mon Sep 17 00:00:00 2001 | ||
From: Florian Rival <[email protected]> | ||
Date: Tue, 3 Jan 2017 21:15:11 +0100 | ||
Subject: [PATCH] Fix crash with SFML embeded in wxWidgets on OS X | ||
|
||
--- | ||
src/SFML/Window/OSX/SFViewController.mm | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/src/SFML/Window/OSX/SFViewController.mm b/src/SFML/Window/OSX/SFViewController.mm | ||
index 7d736e3..113cacd 100644 | ||
index 7d736e3..280ec2b 100644 | ||
--- a/src/SFML/Window/OSX/SFViewController.mm | ||
+++ b/src/SFML/Window/OSX/SFViewController.mm | ||
@@ -82,8 +82,11 @@ -(id)initWithView:(NSView *)view | ||
@@ -82,8 +82,12 @@ -(id)initWithView:(NSView *)view | ||
//////////////////////////////////////////////////////// | ||
-(void)dealloc | ||
{ | ||
+ NSLog(@"SFViewController::dealloc called on %@", self); | ||
[self closeWindow]; | ||
|
||
|
||
+ | ||
+ // See https://github.com/SFML/SFML/issues/824 | ||
+ [[NSNotificationCenter defaultCenter] removeObserver:m_oglView]; | ||
[m_view release]; | ||
[m_oglView release]; | ||
|
||
-- | ||
2.7.4 (Apple Git-66) | ||
|