Skip to content

Commit

Permalink
pop-fe-ps3: check for ICON0/PIC0/PIC1 in the original directory
Browse files Browse the repository at this point in the history
and not in the temp directory in case we created a new bin/cue

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Jul 1, 2022
1 parent 5740089 commit 1a8ff9d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pop-fe-ps3.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def on_path_changed(self, event):

self.master.config(cursor='watch')
self.master.update()
cue_file_orig = cue_file
print('Processing', cue_file) if verbose else None
disc = event.widget.cget('title')
print('Disc', disc) if verbose else None
Expand Down Expand Up @@ -214,23 +215,23 @@ def on_path_changed(self, event):
self.builder.get_variable('snd0_variable').set(games[disc_id]['snd0'])

print('Fetching ICON0') if verbose else None
self.icon0 = popfe.get_icon0_from_game(disc_id, game, cue_file, 'pop-fe-ps3-work/ICON0.PNG')
self.icon0 = popfe.get_icon0_from_game(disc_id, game, cue_file_orig, 'pop-fe-ps3-work/ICON0.PNG')
temp_files.append('pop-fe-ps3-work/ICON0.PNG')
self.icon0.resize((80,80), Image.BILINEAR).save('pop-fe-ps3-work/ICON0.PNG')
self.icon0_tk = tk.PhotoImage(file = 'pop-fe-ps3-work/ICON0.PNG')
c = self.builder.get_object('icon0_canvas', self.master)
c.create_image(0, 0, image=self.icon0_tk, anchor='nw')

print('Fetching PIC0') if verbose else None
self.pic0 = popfe.get_pic0_from_game(disc_id, game, cue_file, 'PIC0.PNG')
self.pic0 = popfe.get_pic0_from_game(disc_id, game, cue_file_orig, 'PIC0.PNG')
temp_files.append('pop-fe-ps3-work/PIC0.PNG')
self.pic0.resize((128,80), Image.BILINEAR).save('pop-fe-ps3-work/PIC0.PNG')
self.pic0_tk = tk.PhotoImage(file = 'pop-fe-ps3-work/PIC0.PNG')
c = self.builder.get_object('pic0_canvas', self.master)
c.create_image(0, 0, image=self.pic0_tk, anchor='nw')

print('Fetching PIC1') if verbose else None
self.pic1 = popfe.get_pic1_from_game(disc_id, game, cue_file, 'PIC1.PNG')
self.pic1 = popfe.get_pic1_from_game(disc_id, game, cue_file_orig, 'PIC1.PNG')
temp_files.append('pop-fe-ps3-work/PIC1.PNG')
self.pic1.resize((128,80), Image.BILINEAR).save('pop-fe-ps3-work/PIC1.PNG')
self.pic1_tk = tk.PhotoImage(file = 'pop-fe-ps3-work/PIC1.PNG')
Expand Down

0 comments on commit 1a8ff9d

Please sign in to comment.