mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
parent
2cf651bed8
commit
62cbe99a27
@ -229,6 +229,7 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
||||
if (!active_) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (EbitenmobileviewIsGL()) {
|
||||
[[self glkView] setNeedsDisplay];
|
||||
@ -236,6 +237,7 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
||||
[self updateEbiten];
|
||||
}
|
||||
|
||||
@synchronized(self) {
|
||||
if (explicitRendering_) {
|
||||
[displayLink_ setPaused:YES];
|
||||
}
|
||||
@ -243,15 +245,14 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
||||
}
|
||||
|
||||
- (void)glkView:(GLKView*)view drawInRect:(CGRect)rect {
|
||||
@synchronized(self) {
|
||||
[self updateEbiten];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateEbiten {
|
||||
if (error_) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSError* err = nil;
|
||||
EbitenmobileviewUpdate(&err);
|
||||
if (err != nil) {
|
||||
@ -303,26 +304,28 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
||||
|
||||
@synchronized(self) {
|
||||
active_ = false;
|
||||
}
|
||||
|
||||
NSError* err = nil;
|
||||
EbitenmobileviewSuspend(&err);
|
||||
if (err != nil) {
|
||||
[self onErrorOnGameUpdate:err];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)resumeGame {
|
||||
NSAssert(started_, @"resumeGame must not be called before viewDidLoad is called");
|
||||
|
||||
@synchronized(self) {
|
||||
active_ = true;
|
||||
}
|
||||
|
||||
NSError* err = nil;
|
||||
EbitenmobileviewResume(&err);
|
||||
if (err != nil) {
|
||||
[self onErrorOnGameUpdate:err];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setExplicitRenderingMode:(BOOL)explicitRendering {
|
||||
@synchronized(self) {
|
||||
|
Loading…
Reference in New Issue
Block a user