Skip to content

Commit 80ed0d9

Browse files
committed
Fixed crash on m1 during window resize
1 parent 8e45627 commit 80ed0d9

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

fusepb/FuseX.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,7 @@
20402040
CODE_SIGN_IDENTITY = "Mac Developer";
20412041
COMBINE_HIDPI_IMAGES = YES;
20422042
COPY_PHASE_STRIP = NO;
2043+
CURRENT_PROJECT_VERSION = 3;
20432044
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
20442045
DEVELOPMENT_TEAM = 48UV5KV3FB;
20452046
ENABLE_HARDENED_RUNTIME = YES;
@@ -2068,6 +2069,7 @@
20682069
INFOPLIST_FILE = "Info-FuseX.plist";
20692070
INSTALL_PATH = /Applications;
20702071
LIBRARY_SEARCH_PATHS = .;
2072+
MARKETING_VERSION = 1.5.6;
20712073
OTHER_CFLAGS = "";
20722074
OTHER_CODE_SIGN_FLAGS = "--deep";
20732075
OTHER_LDFLAGS = (
@@ -2093,6 +2095,7 @@
20932095
CODE_SIGN_IDENTITY = "Mac Developer";
20942096
COMBINE_HIDPI_IMAGES = YES;
20952097
COPY_PHASE_STRIP = YES;
2098+
CURRENT_PROJECT_VERSION = 3;
20962099
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
20972100
DEVELOPMENT_TEAM = 48UV5KV3FB;
20982101
ENABLE_HARDENED_RUNTIME = YES;
@@ -2120,6 +2123,7 @@
21202123
INFOPLIST_FILE = "Info-FuseX.plist";
21212124
INSTALL_PATH = /Applications;
21222125
LIBRARY_SEARCH_PATHS = .;
2126+
MARKETING_VERSION = 1.5.6;
21232127
OTHER_CFLAGS = "";
21242128
OTHER_CODE_SIGN_FLAGS = "--deep";
21252129
OTHER_LDFLAGS = (
@@ -2144,6 +2148,7 @@
21442148
CODE_SIGN_ENTITLEMENTS = FuseX.entitlements;
21452149
CODE_SIGN_IDENTITY = "Mac Developer";
21462150
COMBINE_HIDPI_IMAGES = YES;
2151+
CURRENT_PROJECT_VERSION = 3;
21472152
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
21482153
DEVELOPMENT_TEAM = 48UV5KV3FB;
21492154
ENABLE_HARDENED_RUNTIME = YES;
@@ -2171,6 +2176,7 @@
21712176
INFOPLIST_FILE = "Info-FuseX.plist";
21722177
INSTALL_PATH = /Applications;
21732178
LIBRARY_SEARCH_PATHS = .;
2179+
MARKETING_VERSION = 1.5.6;
21742180
OTHER_CFLAGS = "";
21752181
OTHER_CODE_SIGN_FLAGS = "--deep";
21762182
OTHER_LDFLAGS = (

fusepb/Info-FuseX.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,11 @@
599599
<key>CFBundlePackageType</key>
600600
<string>APPL</string>
601601
<key>CFBundleShortVersionString</key>
602-
<string>1.5.6</string>
602+
<string>$(MARKETING_VERSION)</string>
603603
<key>CFBundleSignature</key>
604604
<string>FUSE</string>
605605
<key>CFBundleVersion</key>
606-
<string>1.5.6</string>
606+
<string>$(CURRENT_PROJECT_VERSION)</string>
607607
<key>LSApplicationCategoryType</key>
608608
<string>public.app-category.games</string>
609609
<key>NSMainNibFile</key>

fusepb/views/DisplayOpenGLView.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,6 @@
241241
-(void) displayLinkStop;
242242
-(void) displayLinkStart;
243243

244+
-(void) doReshape;
245+
244246
@end

fusepb/views/DisplayOpenGLView.m

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -550,16 +550,12 @@ -(void) drawRect:(NSRect)aRect
550550
[view_lock unlock];
551551
}
552552

553-
/* scrolled, moved or resized */
554-
-(void) reshape
553+
-(void) doReshape
555554
{
556555
[view_lock lock];
557556
NSRect rect;
558557

559-
[super reshape];
560-
561558
[[self openGLContext] makeCurrentContext];
562-
[[self openGLContext] update];
563559

564560
rect = [self bounds];
565561

@@ -570,11 +566,20 @@ -(void) reshape
570566

571567
glMatrixMode( GL_MODELVIEW );
572568
glLoadIdentity();
569+
570+
[[self openGLContext] update];
573571

574572
statusbar_updated = YES;
575573
[view_lock unlock];
576574
}
577575

576+
/* scrolled, moved or resized */
577+
-(void) reshape
578+
{
579+
[super reshape];
580+
[self performSelectorOnMainThread:@selector(doReshape) withObject:self waitUntilDone:NO];
581+
}
582+
578583
-(void) destroyTexture
579584
{
580585
GLuint i;

0 commit comments

Comments
 (0)