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;
glViewport(0, 0, self.bounds.size.width * scale, self.bounds.size.height * scale);
if (gbview.gb) {
[self.shader renderBitmap:gbview.currentBuffer
previous:gbview.frameBlendingMode? gbview.previousBuffer : NULL
sized:NSMakeSize(GB_get_screen_width(gbview.gb), GB_get_screen_height(gbview.gb))
inSize:self.bounds.size
scale:scale
withBlendingMode:gbview.frameBlendingMode];
}
glFlush();
}

View File

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