From 19276110a53476fd0d21e299f199dd4d4da7eb33 Mon Sep 17 00:00:00 2001 From: cuu Date: Wed, 20 Jun 2018 20:58:36 +0800 Subject: [PATCH] fix bug dosbox on rom_list_page and remove scalesmooth on sec level icons --- sys.py/UI/Emulator/rom_list_page.py | 5 +++++ sys.py/UI/page.py | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sys.py/UI/Emulator/rom_list_page.py b/sys.py/UI/Emulator/rom_list_page.py index dca2c06..a8d38d5 100644 --- a/sys.py/UI/Emulator/rom_list_page.py +++ b/sys.py/UI/Emulator/rom_list_page.py @@ -135,6 +135,11 @@ class RomListPage(Page): dirmap = {} if os.path.isdir(v) and self._Emulator["FILETYPE"] == "dir": ## like DOSBOX gameshell_bat = self._Emulator["EXT"][0] + + stats = os.stat(v) + if stats.st_gid == self._Parent._FavGID: ##skip fav roms + continue + if FileExists(v+"/"+gameshell_bat): dirmap["gamedir"] = v.decode("utf8") ret.append(dirmap) diff --git a/sys.py/UI/page.py b/sys.py/UI/page.py index 43e998a..9a14168 100644 --- a/sys.py/UI/page.py +++ b/sys.py/UI/page.py @@ -186,8 +186,8 @@ class Page(object): it = self._Icons[0] it._Parent = self it._Index = 0 - it.Adjust(start_x,start_y,icon_width-6,icon_height-6,0) - it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) + it.Adjust(start_x,start_y,icon_width,icon_height,0) + #it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) elif self._IconNumbers == 2: start_x = (self._Width - self._PageIconMargin - self._IconNumbers*icon_width) / 2 + icon_width/2 @@ -197,17 +197,16 @@ class Page(object): it = self._Icons[i] it._Parent = self it._Index = i - it.Adjust(start_x+i*self._PageIconMargin + i*icon_width,start_y, icon_width-6, icon_height-6,0) - it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) + it.Adjust(start_x+i*self._PageIconMargin + i*icon_width,start_y, icon_width, icon_height,0) + #it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) elif self._IconNumbers > 2: for i in range(0,self._IconNumbers): it = self._Icons[i] it._Parent = self it._Index = i - it.Adjust(start_x+i*self._PageIconMargin + i*icon_width,start_y,icon_width-6,icon_height-6,0) - - it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) + it.Adjust(start_x+i*self._PageIconMargin + i*icon_width,start_y,icon_width,icon_height,0) + #it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) ps = PageSelector() ps._IconSurf = MyIconPool._Icons["blueselector"]