Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
71e79a50
Commit
71e79a50
authored
Mar 29, 2021
by
Nikolay Igotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash on iMac.
parent
b2c512dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
MetalRedrawer.mm
skiko/src/jvmMain/objectiveC/macos/MetalRedrawer.mm
+4
-3
No files found.
skiko/src/jvmMain/objectiveC/macos/MetalRedrawer.mm
View file @
71e79a50
...
...
@@ -117,10 +117,10 @@ BOOL isUsingIntegratedGPU() {
io_connect_t switcherConnect;
kernResult = IOServiceOpen(service, mach_task_self(), 0, &switcherConnect);
assert(kernResult == KERN_SUCCESS)
;
if (kernResult != KERN_SUCCESS) return 0
;
kernResult = IOConnectCallScalarMethod(switcherConnect, kOpen, NULL, 0, NULL, NULL);
assert(kernResult == KERN_SUCCESS)
;
if (kernResult != KERN_SUCCESS) return 0
;
uint64_t output;
uint32_t outputCount = 1;
...
...
@@ -132,6 +132,7 @@ BOOL isUsingIntegratedGPU() {
2,
&output,
&outputCount);
if (kernResult != KERN_SUCCESS) return 0;
return output != 0;
}
...
...
@@ -241,4 +242,4 @@ JNIEXPORT void JNICALL Java_org_jetbrains_skiko_redrawer_MetalRedrawer_disposeDe
}
} // extern C
#endif
\ No newline at end of file
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment