summaryrefslogtreecommitdiffstats
path: root/Examples/WhisperDesktop/AppState.cpp
diff options
context:
space:
mode:
authorKonstantin <const@const.me>2023-01-20 20:23:35 +0100
committerKonstantin <const@const.me>2023-01-20 20:23:35 +0100
commite7716954cb681c531132a342b4b486a28179f792 (patch)
tree359f2140ca10f7a5132dea36aa5bbbf16bd21cdd /Examples/WhisperDesktop/AppState.cpp
parent9c30dd0f95a11cb24f97b7eabd8eebb7ebdd5134 (diff)
Minor, UX enhancements
Diffstat (limited to 'Examples/WhisperDesktop/AppState.cpp')
-rw-r--r--Examples/WhisperDesktop/AppState.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Examples/WhisperDesktop/AppState.cpp b/Examples/WhisperDesktop/AppState.cpp
index 651e8ae..b478546 100644
--- a/Examples/WhisperDesktop/AppState.cpp
+++ b/Examples/WhisperDesktop/AppState.cpp
@@ -203,4 +203,17 @@ void AppState::gpuFlagsStore( uint32_t flags )
registryKey.DeleteValue( regValGpuFlags );
else
dwordStore( regValGpuFlags, flags );
+}
+
+bool AppState::boolLoad( LPCTSTR name )
+{
+ return dwordLoad( name, 0 ) != 0;
+}
+
+void AppState::boolStore( LPCTSTR name, bool val )
+{
+ if( val )
+ dwordStore( name, 1 );
+ else
+ registryKey.DeleteValue( name );
} \ No newline at end of file