-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f458fd4
commit 30cacd6
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import Logger from "../logger"; | ||
import Logger from '../logger'; | ||
|
||
const logger = new Logger('CEFSocketFix'); | ||
|
||
const closeCEFSocket = DeckyBackend.callable<[], void>("utilities/close_cef_socket"); | ||
const closeCEFSocket = DeckyBackend.callable<[], void>('utilities/close_cef_socket'); | ||
|
||
export default function cefSocketFix() { | ||
const reg = window.SteamClient?.User?.RegisterForShutdownStart(async () => { | ||
logger.log("Closing CEF socket before shutdown"); | ||
await closeCEFSocket(); | ||
}); | ||
const reg = window.SteamClient?.User?.RegisterForShutdownStart(async () => { | ||
logger.log('Closing CEF socket before shutdown'); | ||
await closeCEFSocket(); | ||
}); | ||
|
||
if (reg) logger.debug("CEF shutdown handler ready"); | ||
if (reg) logger.debug('CEF shutdown handler ready'); | ||
|
||
return () => reg?.unregister(); | ||
} | ||
return () => reg?.unregister(); | ||
} |