@@ -43,8 +43,8 @@ interface IState {
43
43
alwaysShowMenuBar : boolean ;
44
44
minimizeToTraySupported : boolean ;
45
45
minimizeToTray : boolean ;
46
- disableHardwareAccelerationSupported : boolean ;
47
- disableHardwareAcceleration : boolean ;
46
+ hardwareAccelerationSupported : boolean ;
47
+ hardwareAcceleration : boolean ;
48
48
autocompleteDelay : string ;
49
49
readMarkerInViewThresholdMs : string ;
50
50
readMarkerOutOfViewThresholdMs : string ;
@@ -119,8 +119,8 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
119
119
alwaysShowMenuBarSupported : false ,
120
120
minimizeToTray : true ,
121
121
minimizeToTraySupported : false ,
122
- disableHardwareAcceleration : false ,
123
- disableHardwareAccelerationSupported : false ,
122
+ hardwareAcceleration : true ,
123
+ hardwareAccelerationSupported : false ,
124
124
autocompleteDelay :
125
125
SettingsStore . getValueAt ( SettingLevel . DEVICE , 'autocompleteDelay' ) . toString ( 10 ) ,
126
126
readMarkerInViewThresholdMs :
@@ -157,10 +157,10 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
157
157
minimizeToTray = await platform . getMinimizeToTrayEnabled ( ) ;
158
158
}
159
159
160
- const disableHardwareAccelerationSupported = platform . supportsDisableHardwareAcceleration ( ) ;
161
- let disableHardwareAcceleration = false ;
162
- if ( disableHardwareAccelerationSupported ) {
163
- disableHardwareAcceleration = await platform . getDisableHardwareAcceleration ( ) ;
160
+ const hardwareAccelerationSupported = platform . supportsHardwareAcceleration ( ) ;
161
+ let enableHardwareAcceleration = false ;
162
+ if ( hardwareAccelerationSupported ) {
163
+ enableHardwareAcceleration = await platform . getHardwareAccelerationEnabled ( ) ;
164
164
}
165
165
166
166
this . setState ( {
@@ -172,8 +172,8 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
172
172
alwaysShowMenuBar,
173
173
minimizeToTraySupported,
174
174
minimizeToTray,
175
- disableHardwareAccelerationSupported ,
176
- disableHardwareAcceleration ,
175
+ hardwareAccelerationSupported ,
176
+ enableHardwareAcceleration ,
177
177
} ) ;
178
178
}
179
179
@@ -193,9 +193,9 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
193
193
PlatformPeg . get ( ) . setMinimizeToTrayEnabled ( checked ) . then ( ( ) => this . setState ( { minimizeToTray : checked } ) ) ;
194
194
} ;
195
195
196
- private onDisableHardwareAccelerationChange = ( checked : boolean ) => {
197
- PlatformPeg . get ( ) . setDisableHardwareAcceleration ( checked ) . then (
198
- ( ) => this . setState ( { disableHardwareAcceleration : checked } ) ) ;
196
+ private onHardwareAccelerationChange = ( checked : boolean ) => {
197
+ PlatformPeg . get ( ) . setHardwareAccelerationEnabled ( checked ) . then (
198
+ ( ) => this . setState ( { enableHardwareAcceleration : checked } ) ) ;
199
199
} ;
200
200
201
201
private onAutocompleteDelayChange = ( e : React . ChangeEvent < HTMLInputElement > ) => {
@@ -263,12 +263,12 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
263
263
label = { _t ( 'Show tray icon and minimise window to it on close' ) } /> ;
264
264
}
265
265
266
- let disableHardwareAccelerationOption = null ;
267
- if ( this . state . disableHardwareAccelerationSupported ) {
268
- disableHardwareAccelerationOption = < LabelledToggleSwitch
269
- value = { this . state . disableHardwareAcceleration }
270
- onChange = { this . onDisableHardwareAccelerationChange }
271
- label = { _t ( 'Disable hardware acceleration (requires restart to take effect)' ) } /> ;
266
+ let hardwareAccelerationOption = null ;
267
+ if ( this . state . hardwareAccelerationSupported ) {
268
+ hardwareAccelerationOption = < LabelledToggleSwitch
269
+ value = { this . state . enableHardwareAcceleration }
270
+ onChange = { this . onHardwareAccelerationChange }
271
+ label = { _t ( 'Enable hardware acceleration (requires restart to take effect)' ) } /> ;
272
272
}
273
273
274
274
return (
@@ -328,7 +328,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
328
328
< span className = "mx_SettingsTab_subheading" > { _t ( "General" ) } </ span >
329
329
{ this . renderGroup ( PreferencesUserSettingsTab . GENERAL_SETTINGS ) }
330
330
{ minimizeToTrayOption }
331
- { disableHardwareAccelerationOption }
331
+ { hardwareAccelerationOption }
332
332
{ autoHideMenuOption }
333
333
{ autoLaunchOption }
334
334
{ warnBeforeExitOption }
0 commit comments