mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
parent
0b1aec4d27
commit
2c770f3644
@ -122,6 +122,7 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
||||
|
||||
@implementation {{.PrefixUpper}}EbitenViewController {
|
||||
GLKView* glkView_;
|
||||
bool error_;
|
||||
}
|
||||
|
||||
- (GLKView*)glkView {
|
||||
@ -170,13 +171,23 @@ const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
|
||||
}
|
||||
|
||||
- (void)glkView:(GLKView*)view drawInRect:(CGRect)rect {
|
||||
if (error_) {
|
||||
return;
|
||||
}
|
||||
NSError* err = nil;
|
||||
EbitenmobileviewUpdate(&err);
|
||||
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 {
|
||||
for (UITouch* touch in touches) {
|
||||
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>
|
||||
|
||||
@interface {{.PrefixUpper}}EbitenViewController : UIViewController
|
||||
- (void)onErrorOnGameUpdate:(NSError*)err;
|
||||
@end
|
||||
`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user