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