fix bug dosbox on rom_list_page and remove scalesmooth on sec level icons

This commit is contained in:
cuu 2018-06-20 20:58:36 +08:00 committed by clockworkpi
parent b98223b731
commit 19276110a5
2 changed files with 11 additions and 7 deletions

View File

@ -135,6 +135,11 @@ class RomListPage(Page):
dirmap = {} dirmap = {}
if os.path.isdir(v) and self._Emulator["FILETYPE"] == "dir": ## like DOSBOX if os.path.isdir(v) and self._Emulator["FILETYPE"] == "dir": ## like DOSBOX
gameshell_bat = self._Emulator["EXT"][0] 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): if FileExists(v+"/"+gameshell_bat):
dirmap["gamedir"] = v.decode("utf8") dirmap["gamedir"] = v.decode("utf8")
ret.append(dirmap) ret.append(dirmap)

View File

@ -186,8 +186,8 @@ class Page(object):
it = self._Icons[0] it = self._Icons[0]
it._Parent = self it._Parent = self
it._Index = 0 it._Index = 0
it.Adjust(start_x,start_y,icon_width-6,icon_height-6,0) it.Adjust(start_x,start_y,icon_width,icon_height,0)
it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) #it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height))
elif self._IconNumbers == 2: elif self._IconNumbers == 2:
start_x = (self._Width - self._PageIconMargin - self._IconNumbers*icon_width) / 2 + icon_width/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 = self._Icons[i]
it._Parent = self it._Parent = self
it._Index = i it._Index = i
it.Adjust(start_x+i*self._PageIconMargin + i*icon_width,start_y, icon_width-6, icon_height-6,0) 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)) #it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height))
elif self._IconNumbers > 2: elif self._IconNumbers > 2:
for i in range(0,self._IconNumbers): for i in range(0,self._IconNumbers):
it = self._Icons[i] it = self._Icons[i]
it._Parent = self it._Parent = self
it._Index = i it._Index = i
it.Adjust(start_x+i*self._PageIconMargin + i*icon_width,start_y,icon_width-6,icon_height-6,0) 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))
it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height))
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool._Icons["blueselector"]