dblume commited on 2023-08-03 22:39:40
Showing 2 changed files, with 13 additions and 1 deletions.
As of 12.5 EnableAudioDestinationEvent stopped working. Add a couple of event handlers.
| ... | ... |
@@ -78,8 +78,14 @@ function executeTask() as void |
| 78 | 78 |
|
| 79 | 79 |
success = deviceInfo.EnableLinkStatusEvent(true) |
| 80 | 80 |
if not success m.top.updateTextLower = "EnableLinkStatusEvent failure" |
| 81 |
+ |
|
| 82 |
+ mmrb = deviceInfo.GetOSVersion() ' major minor revision build |
|
| 83 |
+ if val(mmrb["major"], 10) < 12 or (val(mmrb["major"], 10) = 12 and mmrb["minor"] = "0") |
|
| 84 |
+ ' Not supported in 12.5. Might get fixed in 13 |
|
| 81 | 85 |
success = deviceInfo.EnableAudioDestinationEvent(true) |
| 82 | 86 |
if not success then m.top.updateTextLower = "EnableAudioDestinationEvent failure" |
| 87 |
+ end if |
|
| 88 |
+ |
|
| 83 | 89 |
success = deviceInfo.EnableAudioGuideChangedEvent(true) |
| 84 | 90 |
if not success then m.top.updateTextLower = "EnableAudioGuideChangedEvent failure" |
| 85 | 91 |
success = deviceInfo.EnableAppFocusEvent(true) |
| ... | ... |
@@ -88,6 +94,10 @@ function executeTask() as void |
| 88 | 94 |
if not success then m.top.updateTextLower = "EnableCodecCapChangedEvent failure" |
| 89 | 95 |
success = deviceInfo.EnableScreensaverExitedEvent(true) |
| 90 | 96 |
if not success then m.top.updateTextLower = "EnableScreensaverExitedEvent failure" |
| 97 |
+ success = deviceInfo.EnableInternetStatusEvent(true) |
|
| 98 |
+ if not success then m.top.updateTextLower = "EnableInternetStatusEvent failure" |
|
| 99 |
+ success = deviceInfo.EnableLowGeneralMemoryEvent(true) |
|
| 100 |
+ if not success then m.top.updateTextLower = "EnableLowGeneralMemoryEvent failure" |
|
| 91 | 101 |
|
| 92 | 102 |
while(true) |
| 93 | 103 |
msg = wait(0, port) |
| ... | ... |
@@ -133,6 +143,8 @@ function executeTask() as void |
| 133 | 143 |
if v <> invalid then m.top.updateTextLower = dt + " AppFocus " + v.toStr() |
| 134 | 144 |
v = aa.LookupCI("generalMemoryLevel")
|
| 135 | 145 |
if v <> invalid then m.top.updateTextLower = dt + " GeneralMemoryLevel " + v.toStr() |
| 146 |
+ v = aa.LookupCI("internetStatus")
|
|
| 147 |
+ if v <> invalid then m.top.updateTextLower = dt + " InternetStatus " + v.toStr() |
|
| 136 | 148 |
elseif msgType = "roInputEvent" |
| 137 | 149 |
info = msg.GetInfo() |
| 138 | 150 |
m.top.updateTextLower = dt + " Input " + FormatJSON(info) |