diff --git a/src/renderer_mtl.h b/src/renderer_mtl.h index f9e57226..961f5579 100644 --- a/src/renderer_mtl.h +++ b/src/renderer_mtl.h @@ -141,7 +141,7 @@ namespace bgfx { namespace mtl id lib = [m_obj newLibraryWithData:(dispatch_data_t)_data error:&error]; BX_WARN(NULL == error , "newLibraryWithData failed: %s" - , error.localizedDescription.UTF8String + , [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding] ); return lib; } @@ -150,10 +150,10 @@ namespace bgfx { namespace mtl { NSError* error; id lib = [m_obj newLibraryWithSource:@(_source) options:nil error:&error]; -// BX_WARN(NULL == error -// , "Shader compilation failed: %s" -// , [error.localizedDescription UTF8String] -// ); + BX_WARN(NULL == error + , "Shader compilation failed: %s" + , [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding] + ); return lib; } @@ -200,7 +200,7 @@ namespace bgfx { namespace mtl id state = [m_obj newRenderPipelineStateWithDescriptor:_descriptor error:&error]; BX_WARN(NULL == error , "newRenderPipelineStateWithDescriptor failed: %s" - , error.localizedDescription.UTF8String + , [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding] ); return state; } @@ -212,7 +212,7 @@ namespace bgfx { namespace mtl BX_WARN(NULL == error , "newRenderPipelineStateWithDescriptor failed: %s" - , error.localizedDescription.UTF8String + , [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding] ); return state; } @@ -225,7 +225,7 @@ namespace bgfx { namespace mtl BX_WARN(NULL == error , "newComputePipelineStateWithFunction failed: %s" - , error.localizedDescription.UTF8String + , [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding] ); return state; }