28 lines
541 B
Objective-C
28 lines
541 B
Objective-C
#import "GameSurfaceView.h"
|
|
#import "LauncherPreferences.h"
|
|
#import "PLProfiles.h"
|
|
#import "utils.h"
|
|
|
|
@interface GameSurfaceView()
|
|
@end
|
|
|
|
@implementation GameSurfaceView
|
|
|
|
- (id)initWithFrame:(CGRect)frame {
|
|
self = [super initWithFrame:frame];
|
|
self.layer.drawsAsynchronously = YES;
|
|
self.layer.opaque = YES;
|
|
|
|
return self;
|
|
}
|
|
|
|
+ (Class)layerClass {
|
|
if ([[PLProfiles resolveKeyForCurrentProfile:@"renderer"] hasPrefix:@"libOSMesa"]) {
|
|
return CALayer.class;
|
|
} else {
|
|
return CAMetalLayer.class;
|
|
}
|
|
}
|
|
|
|
@end
|