mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Merge pull request #9000 from LazyBumHorse/fix_metal
fix black screen in Metal
This commit is contained in:
commit
ed2837ff59
@ -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…
Reference in New Issue
Block a user