More crash fixes, restore Metal support

This commit is contained in:
Lior Halphon 2020-03-27 17:26:51 +03:00
parent 588c0734a9
commit 876b36ac1c
2 changed files with 9 additions and 7 deletions

View File

@ -13,12 +13,14 @@
double scale = self.window.backingScaleFactor; double scale = self.window.backingScaleFactor;
glViewport(0, 0, self.bounds.size.width * scale, self.bounds.size.height * scale); glViewport(0, 0, self.bounds.size.width * scale, self.bounds.size.height * scale);
[self.shader renderBitmap:gbview.currentBuffer if (gbview.gb) {
previous:gbview.frameBlendingMode? gbview.previousBuffer : NULL [self.shader renderBitmap:gbview.currentBuffer
sized:NSMakeSize(GB_get_screen_width(gbview.gb), GB_get_screen_height(gbview.gb)) previous:gbview.frameBlendingMode? gbview.previousBuffer : NULL
inSize:self.bounds.size sized:NSMakeSize(GB_get_screen_width(gbview.gb), GB_get_screen_height(gbview.gb))
scale:scale inSize:self.bounds.size
withBlendingMode:gbview.frameBlendingMode]; scale:scale
withBlendingMode:gbview.frameBlendingMode];
}
glFlush(); glFlush();
} }

View File

@ -23,7 +23,7 @@ static const vector_float2 rect[] =
+ (bool)isSupported + (bool)isSupported
{ {
if (MTLCopyAllDevices) { if (MTLCopyAllDevices) {
return false; //[MTLCopyAllDevices() count]; return [MTLCopyAllDevices() count];
} }
return false; return false;
} }