check zoom values.
This commit is contained in:
Binary file not shown.
@@ -14,6 +14,9 @@ public class Loupe : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
CheckVariables();
|
||||
|
||||
if (uDesktopDuplication.Manager.cursorMonitorId < 0) return;
|
||||
uddTexture_.monitorId = uDesktopDuplication.Manager.cursorMonitorId;
|
||||
|
||||
// To get other monitor textures, set dirty flag.
|
||||
@@ -31,5 +34,11 @@ public class Loupe : MonoBehaviour
|
||||
uddTexture_.clipPos = new Vector2(x, y);
|
||||
uddTexture_.clipScale = new Vector2(w, h);
|
||||
}
|
||||
|
||||
void CheckVariables()
|
||||
{
|
||||
if (zoom < 1f) zoom = 1f;
|
||||
if (aspect < 0.01f) aspect = 0.01f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -118,7 +118,9 @@ public class Manager : MonoBehaviour
|
||||
Debug.Log("[uDesktopDuplication] Reinitialize");
|
||||
Lib.Reinitialize();
|
||||
CreateMonitors();
|
||||
onReinitialized();
|
||||
if (onReinitialized != null) {
|
||||
onReinitialized();
|
||||
}
|
||||
}
|
||||
|
||||
void ReinitializeIfNeeded()
|
||||
|
||||
Reference in New Issue
Block a user