X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=cc7dc2aa33fb4111ff5f737ca76a4a731437960c;hb=c9433eab5c4317ed4f89164b386a7d33562e29be;hp=e1ac9ccc26659467c0490607596c87ed8e235ca2;hpb=69e8efac8d856859c55237e085ff8b514ae1aa3c;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index e1ac9ccc..cc7dc2aa 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -1,7 +1,7 @@ /*********************************************************** * Artsoft Retro-Game Library * *----------------------------------------------------------* -* (c) 1994-2001 Artsoft Entertainment * +* (c) 1994-2002 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -669,7 +669,8 @@ Bitmap *LoadImage(char *filename) new_bitmap = X11LoadImage(filename); #endif - new_bitmap->source_filename = getStringCopy(filename); + if (new_bitmap) + new_bitmap->source_filename = getStringCopy(filename); return new_bitmap; } @@ -737,19 +738,18 @@ inline void OpenAudio(void) audio.sound_available = FALSE; audio.music_available = FALSE; audio.loops_available = FALSE; - audio.mods_available = FALSE; - audio.sound_enabled = FALSE; + audio.sound_enabled = FALSE; audio.sound_deactivated = FALSE; - audio.soundserver_pipe[0] = audio.soundserver_pipe[1] = 0; - audio.soundserver_pid = -1; + audio.mixer_pipe[0] = audio.mixer_pipe[1] = 0; + audio.mixer_pid = -1; audio.device_name = NULL; - audio.device_fd = 0; + audio.device_fd = -1; - audio.channels = 0; + audio.num_channels = 0; audio.music_channel = 0; - audio.music_nr = 0; + audio.first_sound_channel = 0; #if defined(TARGET_SDL) SDLOpenAudio(); @@ -822,7 +822,9 @@ inline Key GetEventKey(KeyEvent *event, boolean with_modifiers) (int)SDL_GetModState()); #endif - if (with_modifiers && event->keysym.unicode != 0) + if (with_modifiers && + event->keysym.unicode > 0x0000 && + event->keysym.unicode < 0x2000) return event->keysym.unicode; else return event->keysym.sym;