From fb2f4b0f127109b432aa2e431e530cbe40683b9f Mon Sep 17 00:00:00 2001 From: zones Date: Sun, 30 Jan 2011 20:51:23 +0900 Subject: [PATCH] Unix: fix segfault, fix hang-up with -DNOSOUND. --- unix/unix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix/unix.cpp b/unix/unix.cpp index ad50023c..aaec24f7 100644 --- a/unix/unix.cpp +++ b/unix/unix.cpp @@ -891,11 +891,13 @@ void S9xAutoSaveSRAM (void) void S9xSyncSpeed (void) { +#ifndef NOSOUND if (Settings.SoundSync) { while (!S9xSyncSound()) usleep(0); } +#endif if (Settings.DumpStreams) return; @@ -1550,6 +1552,7 @@ int main (int argc, char **argv) printf("\n\nSnes9x " VERSION " for unix\n"); snprintf(default_dir, PATH_MAX + 1, "%s%s%s", getenv("HOME"), SLASH_STR, ".snes9x"); + s9x_base_dir = default_dir; ZeroMemory(&Settings, sizeof(Settings)); Settings.MouseMaster = TRUE;