Skip to content

Commit 2d3c9ff

Browse files
azhirnovTheMostDiligent
authored andcommitted
MacOS: disable mode selection button if backend is not supported
1 parent 75ddcd7 commit 2d3c9ff

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.mm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ - (void) setWindowTitle:(NSString*) title
3737
[mainWindow setTitle:title];
3838
}
3939

40+
- (void)viewDidLoad
41+
{
42+
#if !GL_SUPPORTED && !GLES_SUPPORTED
43+
((NSButton*)self.view.subviews[0]).enabled = false;
44+
#endif
45+
46+
#if !VULKAN_SUPPORTED
47+
((NSButton*)self.view.subviews[1]).enabled = false;
48+
#endif
49+
50+
#if !METAL_SUPPORTED
51+
((NSButton*)self.view.subviews[2]).enabled = false;
52+
#endif
53+
}
54+
4055
- (void) terminateApp:(NSString*) error
4156
{
4257
NSAlert *alert = [[NSAlert alloc] init];

0 commit comments

Comments
 (0)