Compare commits

...

3 Commits

Author SHA1 Message Date
Marc Brooks 72f2c3a146
Merge 06bb4b80b6 into 21e30c60ea 2025-05-22 11:07:11 +02:00
Aveline 21e30c60ea
fix: display scaling broken (#499) 2025-05-22 11:01:28 +02:00
Aveline 25e30f6420
refactor: remove init functions (#489) 2025-05-22 10:29:16 +02:00
5 changed files with 12 additions and 10 deletions

View File

@ -4,6 +4,7 @@ linters:
- forbidigo
- misspell
- whitespace
- gochecknoinits
settings:
forbidigo:
forbid:
@ -22,6 +23,9 @@ linters:
- linters:
- errcheck
path: _test.go
- linters:
- gochecknoinits
path: internal/logging/sse.go
paths:
- third_party$
- builtin$

View File

@ -370,9 +370,7 @@ func startBacklightTickers() {
}
}
func init() {
ensureConfigLoaded()
func initDisplay() {
go func() {
waitCtrlClientConnected()
displayLogger.Info().Msg("setting initial display contents")

View File

@ -15,9 +15,7 @@ func rpcGetJigglerState() bool {
return jigglerEnabled
}
func init() {
ensureConfigLoaded()
func initJiggler() {
go runJiggler()
}

View File

@ -75,8 +75,8 @@ func Main() {
}
}()
// initialize usb gadget
initUsbGadget()
if err := setInitialVirtualMediaState(); err != nil {
logger.Warn().Err(err).Msg("failed to set initial virtual media state")
}
@ -84,6 +84,10 @@ func Main() {
if err := initImagesFolder(); err != nil {
logger.Warn().Err(err).Msg("failed to init images folder")
}
initJiggler()
// initialize display
initDisplay()
go func() {
time.Sleep(15 * time.Minute)

View File

@ -674,7 +674,6 @@ export default function WebRTCVideo() {
<div className="grid grow grid-rows-(--grid-bodyFooter) overflow-hidden">
<div className="relative mx-4 my-2 flex items-center justify-center overflow-hidden">
<div className="relative flex h-full w-full items-center justify-center">
<div className="relative inline-block">
{/* In relative mouse mode and under https, we enable the pointer lock, and to do so we need a bar to show the user to click on the video to enable mouse control */}
<PointerLockBar show={showPointerLockBar} />
<video
@ -688,7 +687,7 @@ export default function WebRTCVideo() {
disablePictureInPicture
controlsList="nofullscreen"
className={cx(
"z-30 max-h-full min-h-[384px] max-w-full min-w-[512px] bg-black/50 object-contain transition-all duration-1000",
"max-h-full min-h-[384px] max-w-full min-w-[512px] bg-black/50 object-contain transition-all duration-1000",
{
"cursor-none": settings.isCursorHidden,
"opacity-0":
@ -718,7 +717,6 @@ export default function WebRTCVideo() {
</div>
</div>
)}
</div>
</div>
</div>
<VirtualKeyboard />