Skip to content

Commit

Permalink
Unbreak one shot mode. Still needs cleanup though...
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzion committed Sep 6, 2010
1 parent 041ab62 commit 5aa6fb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FoFiX.py
Expand Up @@ -177,7 +177,7 @@ def main():
# Check for a valid invocation of one-shot mode.
if playing is not None:
Log.debug('Validating song directory for one-shot mode.')
library = Config.get("game","base_library")
library = Config.get("setlist","base_library")
basefolder = os.path.join(Version.dataPath(),library,"songs",playing)
if not (os.path.exists(os.path.join(basefolder, "song.ini")) and (os.path.exists(os.path.join(basefolder, "notes.mid")) or os.path.exists(os.path.join(basefolder, "notes-unedited.mid"))) and (os.path.exists(os.path.join(basefolder, "song.ogg")) or os.path.exists(os.path.join(basefolder, "guitar.ogg")))):
Log.warn("Song directory provided ('%s') is not a valid song directory. Starting up FoFiX in standard mode." % playing)
Expand All @@ -187,8 +187,8 @@ def main():
# Set up one-shot mode if the invocation is valid for it.
if playing is not None:
Log.debug('Entering one-shot mode.')
Config.set("game", "selected_library", "songs")
Config.set("game", "selected_song", playing)
Config.set("setlist", "selected_library", "songs")
Config.set("setlist", "selected_song", playing)
engine.cmdPlay = 1
if difficulty is not None:
engine.cmdDiff = int(difficulty)
Expand Down
2 changes: 2 additions & 0 deletions src/SongChoosingScene.py
Expand Up @@ -740,6 +740,8 @@ def quit(self):
def keyPressed(self, key, unicode):
self.lastTime = self.time
c = self.engine.input.controls.getMapping(key)
self.searching = False
self.selectedItem = None
if key == pygame.K_SLASH and not self.searching:
self.searching = True
elif (key in range(30,123) or key == pygame.K_BACKSPACE) and not self.moreInfo:
Expand Down

0 comments on commit 5aa6fb6

Please sign in to comment.