mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
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
|
||||
{
|
||||
/* 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];
|
||||
_shader = nil;
|
||||
|
||||
|
@ -129,12 +129,17 @@ static bool metal_set_shader(void *data,
|
||||
if (!md)
|
||||
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;
|
||||
}
|
||||
|
||||
/* TODO actually return to stock */
|
||||
if (string_is_empty(path))
|
||||
return true;
|
||||
|
||||
return [md.frameView setShaderFromPath:[NSString stringWithUTF8String:path]];
|
||||
#else
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user