@@ -2790,23 +2790,23 @@ int DisplayServerWindows::accessibility_should_increase_contrast() const {
27902790}
27912791
27922792int DisplayServerWindows::accessibility_should_reduce_animation () const {
2793- bool anim_enabled = false ;
2793+ BOOL anim_enabled = false ; // Note: this should be BOOL (WinAPI), not bool (C++), since SystemParametersInfoA expect variable with specific size.
27942794 if (!SystemParametersInfoA (SPI_GETCLIENTAREAANIMATION, 0 , &anim_enabled, 0 )) {
27952795 return -1 ;
27962796 }
27972797 return (!anim_enabled);
27982798}
27992799
28002800int DisplayServerWindows::accessibility_should_reduce_transparency () const {
2801- bool tr_enabled = false ;
2801+ BOOL tr_enabled = false ; // Note: this should be BOOL (WinAPI), not bool (C++), since SystemParametersInfoA expect variable with specific size.
28022802 if (!SystemParametersInfoA (SPI_GETDISABLEOVERLAPPEDCONTENT, 0 , &tr_enabled, 0 )) {
28032803 return -1 ;
28042804 }
28052805 return tr_enabled;
28062806}
28072807
28082808int DisplayServerWindows::accessibility_screen_reader_active () const {
2809- bool sr_enabled = false ;
2809+ BOOL sr_enabled = false ; // Note: this should be BOOL (WinAPI), not bool (C++), since SystemParametersInfoA expect variable with specific size.
28102810 if (SystemParametersInfoA (SPI_GETSCREENREADER, 0 , &sr_enabled, 0 ) && sr_enabled) {
28112811 return true ;
28122812 }
@@ -7208,6 +7208,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
72087208
72097209 windows[MAIN_WINDOW_ID].initialized = true ;
72107210
7211+ #ifdef ACCESSKIT_ENABLED
72117212 if (accessibility_screen_reader_active ()) {
72127213 _THREAD_SAFE_LOCK_
72137214 uint64_t time_wait = OS::get_singleton ()->get_ticks_msec ();
@@ -7225,6 +7226,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
72257226 }
72267227 _THREAD_SAFE_UNLOCK_
72277228 }
7229+ #endif
72287230
72297231#if defined(RD_ENABLED)
72307232 if (rendering_context) {
0 commit comments