Skip to content

Commit 7c91066

Browse files
Update version to 1.0.2
1 parent 1c034be commit 7c91066

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

obs-zoom-to-mouse.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
local obs = obslua
88
local ffi = require("ffi")
9-
local VERSION = "1.0"
9+
local VERSION = "1.0.2"
1010
local CROP_FILTER_NAME = "obs-zoom-to-mouse-crop"
1111

1212
local socket_available, socket = pcall(require, "ljsocket")
@@ -1158,7 +1158,8 @@ function log_current_settings()
11581158
use_socket = use_socket,
11591159
socket_port = socket_port,
11601160
socket_poll = socket_poll,
1161-
debug_logs = debug_logs
1161+
debug_logs = debug_logs,
1162+
version = VERSION
11621163
}
11631164

11641165
log("OBS Version: " .. string.format("%.1f", major) .. "." .. minor)
@@ -1195,7 +1196,7 @@ function on_print_help()
11951196

11961197
if socket_available then
11971198
help = help ..
1198-
"Enable remote mouse listener: True to start a UDP socket server that will listen for mouse position messages from a remote client\n" ..
1199+
"Enable remote mouse listener: True to start a UDP socket server that will listen for mouse position messages from a remote client, see: https://github.com/BlankSourceCode/obs-zoom-to-mouse-remote\n" ..
11991200
"Port: The port number to use for the socket server\n" ..
12001201
"Poll Delay: The time between updating the mouse position (in milliseconds)\n"
12011202
end
@@ -1323,6 +1324,11 @@ end
13231324
function script_load(settings)
13241325
sceneitem_info_orig = nil
13251326

1327+
-- Workaround for detecting if OBS is already loaded and we were reloaded using "Reload Scripts"
1328+
local current_scene = obs.obs_frontend_get_current_scene()
1329+
is_obs_loaded = current_scene ~= nil -- Current scene is nil on first OBS load
1330+
obs.obs_source_release(current_scene)
1331+
13261332
-- Add our hotkey
13271333
hotkey_zoom_id = obs.obs_hotkey_register_frontend("toggle_zoom_hotkey", "Toggle zoom to mouse",
13281334
on_toggle_zoom)

0 commit comments

Comments
 (0)