mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 21:21:57 -04:00
Add pause on unfocus feature
This commit is contained in:
@@ -12,6 +12,8 @@ namespace dusk::audio {
|
||||
|
||||
void SetMasterVolume(f32 value);
|
||||
|
||||
void SetPaused(bool paused);
|
||||
|
||||
u32 GetResetCount(int channelIdx);
|
||||
|
||||
f32 VolumeFromU16(u16 value);
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace game_clock {
|
||||
|
||||
void ensure_initialized();
|
||||
void reset_accumulator();
|
||||
void reset_frame_timer();
|
||||
|
||||
constexpr float sim_pace() { return 1.0f / 30.0f; }
|
||||
constexpr float period_for_original_frames(float frame_count) { return frame_count * sim_pace(); }
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace dusk {
|
||||
extern bool IsRunning;
|
||||
extern bool IsShuttingDown;
|
||||
extern bool IsGameLaunched;
|
||||
extern bool IsFocusPaused;
|
||||
}
|
||||
|
||||
#endif // DUSK_MAIN_H
|
||||
|
||||
@@ -68,6 +68,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> enableMirrorMode;
|
||||
ConfigVar<bool> invertCameraXAxis;
|
||||
ConfigVar<bool> disableMainHUD;
|
||||
ConfigVar<bool> pauseOnFocusLost;
|
||||
|
||||
// Graphics
|
||||
ConfigVar<BloomMode> bloomMode;
|
||||
|
||||
Reference in New Issue
Block a user