f2e-spec icon indicating copy to clipboard operation
f2e-spec copied to clipboard

Kiosk mode -> limit playlist and boot straight to songs.

Open nieknooijens opened this issue 10 months ago • 14 comments

What does this PR do?

Adds the kiosk mode menu with settings allowing you to limit the playlist size and boot straight to the song screen.

Closes Issue(s)

none

Motivation

Too little personell at tomo conventions, so we're automating the karaoke booth. To avoid abuse of the playlist system we limit the maximum amount of songs. We also just want to connect power, and have the system boot straight into karaoke mode so any idiot can set it up. Starting the webbrowser on a different screen will be done by shell script.

nieknooijens avatar Apr 03 '24 11:04 nieknooijens

windows build fails in portaudio so that's outside of my PR.

nieknooijens avatar Apr 03 '24 14:04 nieknooijens

No, it is in main.cc:

D:\a\performous\performous\performous\game\main.cc(161): error C3861: 'sleep': identifier not found

Do you really need a sleep? If yes use std::this_thread::sleep_for.

twollgam avatar Apr 03 '24 17:04 twollgam

Possibly closes #7 ?

Baklap4 avatar Apr 05 '24 16:04 Baklap4

@nieknooijens my question: why sleep exactly one second? The problem with the fixed duration is that on some systems it is too long on other it is too short. So what happens if you remove the sleep? Or do we need to wait until all songs are loaded?

twollgam avatar Apr 05 '24 17:04 twollgam

@nieknooijens my question: why sleep exactly one second? The problem with the fixed duration is that on some systems it is too long on other it is too short. So what happens if you remove the sleep? Or do we need to wait until all songs are loaded?

I wait until at least one song has loaded. So untill the songs array isn't empty anymore. If it is empty, I'll wait a second and try again. The reason for the sleep is that it makes the process yield rather than busy-wait. So if you have a single CPU, you give it time to switch threads instead of busy waiting.

nieknooijens avatar Apr 05 '24 18:04 nieknooijens

Possibly closes #7 ?

Probably not all of it, but it's a start.

nieknooijens avatar Apr 05 '24 18:04 nieknooijens

@nieknooijens ok I understand. Then I think you should use 10ms which will respond more smooth.

twollgam avatar Apr 05 '24 18:04 twollgam

BTW I can do a code review if you want.

twollgam avatar Apr 05 '24 18:04 twollgam

Yes please :D if @ooshlablu can test this, that'd be great

Baklap4 avatar Apr 06 '24 14:04 Baklap4

@nieknooijens Can you rebase this on current master to get the Ubuntu 24.04 packages?

ooshlablu avatar Jul 31 '24 17:07 ooshlablu

Sure I'll look at it this weekend. (Very busy at work ATM, it's a pain to get Japanese spaghetti code working on a different platform)

2024年7月31日(水) 19:05 ooshlablu @.***>:

@nieknooijens https://github.com/nieknooijens Can you rebase this on current master to get the Ubuntu 24.04 packages?

— Reply to this email directly, view it on GitHub https://github.com/performous/performous/pull/980#issuecomment-2260975479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVKGWZLVWHNM3EC2TLA7FLZPEKMDAVCNFSM6AAAAABFVC622SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQHE3TKNBXHE . You are receiving this because you were mentioned.Message ID: @.***>

nieknooijens avatar Jul 31 '24 19:07 nieknooijens

so that´s the rebase...

nieknooijens avatar Aug 05 '24 18:08 nieknooijens

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Aug 05 '24 18:08 sonarqubecloud[bot]