Force software rendering earlier
We need to do this before a QApplication exists
This commit is contained in:
parent
35beb84e85
commit
6770a474c4
@ -70,6 +70,10 @@ def early_init(args):
|
||||
|
||||
objects.backend = get_backend(args)
|
||||
|
||||
if (objects.backend == usertypes.Backend.QtWebEngine and
|
||||
config.val.force_software_rendering):
|
||||
os.environ['QT_XCB_FORCE_SOFTWARE_OPENGL'] = '1'
|
||||
|
||||
|
||||
def get_backend(args):
|
||||
"""Find out what backend to use based on available libraries."""
|
||||
|
@ -139,17 +139,12 @@ def _show_dialog(*args, **kwargs):
|
||||
|
||||
def _handle_nouveau_graphics():
|
||||
assert objects.backend == usertypes.Backend.QtWebEngine, objects.backend
|
||||
force_sw_var = 'QT_XCB_FORCE_SOFTWARE_OPENGL'
|
||||
|
||||
if version.opengl_vendor() != 'nouveau':
|
||||
return
|
||||
|
||||
if (os.environ.get('LIBGL_ALWAYS_SOFTWARE') == '1' or
|
||||
force_sw_var in os.environ):
|
||||
return
|
||||
|
||||
if config.val.force_software_rendering:
|
||||
os.environ[force_sw_var] = '1'
|
||||
'QT_XCB_FORCE_SOFTWARE_OPENGL' in os.environ):
|
||||
return
|
||||
|
||||
button = _Button("Force software rendering", 'force_software_rendering',
|
||||
|
Loading…
Reference in New Issue
Block a user