mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
parent
0b1aec4d27
commit
2c770f3644
@ -122,6 +122,7 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
|||||||
|
|
||||||
@implementation {{.PrefixUpper}}EbitenViewController {
|
@implementation {{.PrefixUpper}}EbitenViewController {
|
||||||
GLKView* glkView_;
|
GLKView* glkView_;
|
||||||
|
bool error_;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (GLKView*)glkView {
|
- (GLKView*)glkView {
|
||||||
@ -170,13 +171,23 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)glkView:(GLKView*)view drawInRect:(CGRect)rect {
|
- (void)glkView:(GLKView*)view drawInRect:(CGRect)rect {
|
||||||
|
if (error_) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
NSError* err = nil;
|
NSError* err = nil;
|
||||||
EbitenmobileviewUpdate(&err);
|
EbitenmobileviewUpdate(&err);
|
||||||
if (err != nil) {
|
if (err != nil) {
|
||||||
NSLog(@"Error: %@", err);
|
[self performSelectorOnMainThread:@selector(onErrorOnGameUpdate:)
|
||||||
|
withObject:err
|
||||||
|
waitUntilDone:NO];
|
||||||
|
error_ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)onErrorOnGameUpdate:(NSError*)err {
|
||||||
|
NSLog(@"Error: %@", err);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)updateTouches:(NSSet*)touches {
|
- (void)updateTouches:(NSSet*)touches {
|
||||||
for (UITouch* touch in touches) {
|
for (UITouch* touch in touches) {
|
||||||
if (touch.view != [self glkView]) {
|
if (touch.view != [self glkView]) {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -212,6 +212,7 @@ const objcH = `// Code generated by ebitenmobile. DO NOT EDIT.
|
|||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
@interface {{.PrefixUpper}}EbitenViewController : UIViewController
|
@interface {{.PrefixUpper}}EbitenViewController : UIViewController
|
||||||
|
- (void)onErrorOnGameUpdate:(NSError*)err;
|
||||||
@end
|
@end
|
||||||
`
|
`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user