From 47f0fdab97b5df5ade28bfc0c81fb9f6ad9d3107 Mon Sep 17 00:00:00 2001 From: cuu Date: Fri, 4 Jan 2019 19:13:44 +0800 Subject: [PATCH] gpu driver switch bug fix --- Menu/GameShell/10_Settings/Lima/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Menu/GameShell/10_Settings/Lima/__init__.py b/Menu/GameShell/10_Settings/Lima/__init__.py index 92c1a41..3ea9d56 100644 --- a/Menu/GameShell/10_Settings/Lima/__init__.py +++ b/Menu/GameShell/10_Settings/Lima/__init__.py @@ -197,9 +197,9 @@ class LanguagesPage(Page): self._Screen.SwapAndShow() if "modesetting" in cur_li._Value: - os.system("touch ~/.lima") + os.system("touch %s/.lima" % os.path.expanduser('~') ) else: - os.system("rm ~/.lima") + os.system("rm %s/.lima" % os.path.expanduser('~') ) pygame.time.delay(800) os.system("sudo reboot") @@ -220,14 +220,17 @@ class LanguagesPage(Page): thedrv = "" if "arm" in platform.machine(): - if FileExists("~/.lima"): + if FileExists("%s/.lima" % os.path.expanduser('~')): thedrv = "modesetting" else: thedrv = "fbturbo" if thedrv == "": thedrv = "fbturbo" - + + for i in self._MyList: + i._Active = False + for i in self._MyList: if thedrv in i._Value: i._Active = True