add dpi warning.

This commit is contained in:
hecomi
2016-11-13 11:12:45 +09:00
parent e466aa65db
commit 3567182a4d
2 changed files with 10 additions and 6 deletions
@@ -115,7 +115,7 @@ public class Manager : MonoBehaviour
[ContextMenu("Reinitialize")] [ContextMenu("Reinitialize")]
void Reinitialize() void Reinitialize()
{ {
Debug.Log("[uDesktopDuplication] Reinitialize"); Debug.Log("[uDD] Reinitialize");
Lib.Reinitialize(); Lib.Reinitialize();
CreateMonitors(); CreateMonitors();
if (onReinitialized != null) { if (onReinitialized != null) {
@@ -13,23 +13,27 @@ public class Monitor
switch (state) switch (state)
{ {
case MonitorState.InvalidArg: case MonitorState.InvalidArg:
Debug.LogErrorFormat("[{0}:{1}] Invalid.", id, name); Debug.LogErrorFormat("[uDD] {0}:{1} => Invalid.", id, name);
break; break;
case MonitorState.AccessDenied: case MonitorState.AccessDenied:
Debug.LogErrorFormat("[{0}:{1}] Access Denied.", id, name); Debug.LogErrorFormat("[uDD] {0}:{1} => Access Denied.", id, name);
break; break;
case MonitorState.Unsupported: case MonitorState.Unsupported:
Debug.LogErrorFormat("[{0}:{1}] Unsupported.", id, name); Debug.LogErrorFormat("[uDD] {0}:{1} => Unsupported.", id, name);
break; break;
case MonitorState.SessionDisconnected: case MonitorState.SessionDisconnected:
Debug.LogErrorFormat("[{0}:{1}] Disconnected.", id, name); Debug.LogErrorFormat("[uDD] {0}:{1} => Disconnected.", id, name);
break; break;
case MonitorState.NotSet: case MonitorState.NotSet:
Debug.LogErrorFormat("[{0}:{1}] Something wrong.", id, name); Debug.LogErrorFormat("[uDD] {0}:{1} => Something wrong.", id, name);
break; break;
default: default:
break; break;
} }
if (dpiX == 0 || dpiY == 0) {
Debug.LogWarningFormat("[uDD] {0}:{1} => Could not get DPI", id, name);
}
} }
public int id public int id