Skip to content

Commit db0f80b

Browse files
Move to libobjc and screen_capture
1 parent eb2c39c commit db0f80b

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

obs-zoom-to-mouse.lua

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,7 @@ elseif ffi.os == "OSX" then
129129
int access(const char *path, int amode);
130130
]])
131131

132-
local framework = "AppKit"
133-
local frameworkSearchPaths = {
134-
"/System/Library/Frameworks/%s.framework/%s",
135-
"/Library/Frameworks/%s.framework/%s",
136-
"~/Library/Frameworks/%s.framework/%s"
137-
}
138-
139-
-- Find the OSX lib to load
140-
for i, path in pairs(frameworkSearchPaths) do
141-
path = path:format(framework, framework)
142-
if ffi.C.access(path, 4) == 0 then
143-
osx_lib = ffi.load(path, true)
144-
break
145-
end
146-
end
147-
132+
osx_lib = ffi.load("libobjc")
148133
if osx_lib ~= nil then
149134
osx_nsevent = {
150135
class = osx_lib.objc_getClass("NSEvent"),
@@ -212,7 +197,7 @@ function get_dc_info()
212197
elseif ffi.os == "OSX" then
213198
if major > 29.1 then
214199
return {
215-
source_id = "display_capture",
200+
source_id = "screen_capture",
216201
prop_id = "display_uuid",
217202
prop_type = "string"
218203
}
@@ -549,8 +534,6 @@ function refresh_sceneitem(find_newest)
549534
source = nil
550535
return
551536
end
552-
553-
monitor_info = get_monitor_info(source)
554537
end
555538
end
556539
end

0 commit comments

Comments
 (0)