fix black screen in Metal
This commit is contained in:
parent
faef9413e3
commit
b5199d7921
|
@ -1134,10 +1134,6 @@ typedef struct MTLALIGN(16)
|
||||||
|
|
||||||
- (BOOL)setShaderFromPath:(NSString *)path
|
- (BOOL)setShaderFromPath:(NSString *)path
|
||||||
{
|
{
|
||||||
/* TODO use stock shader if string_is_empty(path.UTF8String), this is just a safety guard: */
|
|
||||||
if (string_is_empty(path.UTF8String))
|
|
||||||
return YES;
|
|
||||||
|
|
||||||
[self _freeVideoShader:_shader];
|
[self _freeVideoShader:_shader];
|
||||||
_shader = nil;
|
_shader = nil;
|
||||||
|
|
||||||
|
|
|
@ -129,12 +129,17 @@ static bool metal_set_shader(void *data,
|
||||||
if (!md)
|
if (!md)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!string_is_empty(path) && type != RARCH_SHADER_SLANG)
|
if (type != RARCH_SHADER_SLANG)
|
||||||
{
|
{
|
||||||
RARCH_WARN("[Metal] Only Slang shaders are supported. Falling back to stock.\n");
|
if (!string_is_empty(path) && type != RARCH_SHADER_SLANG)
|
||||||
|
RARCH_WARN("[Metal] Only Slang shaders are supported. Falling back to stock.\n");
|
||||||
path = NULL;
|
path = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO actually return to stock */
|
||||||
|
if (string_is_empty(path))
|
||||||
|
return true;
|
||||||
|
|
||||||
return [md.frameView setShaderFromPath:[NSString stringWithUTF8String:path]];
|
return [md.frameView setShaderFromPath:[NSString stringWithUTF8String:path]];
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue